Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

needs type casts to compile on Linux [ODBC142] #139

Closed
firebird-automations opened this issue Mar 23, 2012 · 3 comments
Closed

needs type casts to compile on Linux [ODBC142] #139

firebird-automations opened this issue Mar 23, 2012 · 3 comments

Comments

@firebird-automations
Copy link

Submitted by: Rafael Kitover (rkitover)

Here is my diff:

Index: Main.cpp

RCS file: /cvsroot/firebird/OdbcJdbc/Main.cpp,v
retrieving revision 1.19
diff -u -5 -p -r1.19 Main.cpp
--- Main.cpp 25 Jun 2008 09:02:03 -0000 1.19
+++ Main.cpp 23 Mar 2012 18:07:04 -0000
@@ -294,21 +294,21 @@ SQLRETURN SQL_API SQLError( SQLHENV hEnv
TRACE("SQLError");

if \( hStmt \)
\{
	GUARD\_HSTMT\( hStmt \);

- return ((OdbcStatement*)hStmt)->sqlError( sqlState, nativeErrorCode, msgBuffer,
+ return ((OdbcStatement*)hStmt)->sqlError( sqlState, (int*)nativeErrorCode, msgBuffer,
msgBufferLength, msgLength );
}
if ( hDbc )
{
GUARD_HDBC( hDbc );
- return ((OdbcConnection*)hDbc)->sqlError( sqlState, nativeErrorCode, msgBuffer,
+ return ((OdbcConnection*)hDbc)->sqlError( sqlState, (int*)nativeErrorCode, msgBuffer,
msgBufferLength, msgLength );
}
if ( hEnv )
- return ((OdbcEnv*)hEnv)->sqlError( sqlState, nativeErrorCode, msgBuffer,
+ return ((OdbcEnv*)hEnv)->sqlError( sqlState, (int*)nativeErrorCode, msgBuffer,
msgBufferLength, msgLength );

return SQL\_ERROR;

}

Index: MainUnicode.cpp

RCS file: /cvsroot/firebird/OdbcJdbc/MainUnicode.cpp,v
retrieving revision 1.4
diff -u -5 -p -r1.4 MainUnicode.cpp
--- MainUnicode.cpp 11 Oct 2011 13:11:46 -0000 1.4
+++ MainUnicode.cpp 23 Mar 2012 18:07:04 -0000
@@ -339,22 +339,22 @@ SQLRETURN SQL_API SQLErrorW( SQLHENV hEn

if \( hStmt \)
\{
	GUARD\_HSTMT\( hStmt \);
	Buffer\.setConnection\( GETCONNECT\_STMT\( hStmt \) \);

- return ((OdbcStatement*)hStmt)->sqlError( State, nativeErrorCode, Buffer,
+ return ((OdbcStatement*)hStmt)->sqlError( State, (int*)nativeErrorCode, Buffer,
Buffer.getLength(), msgLength );
}
if ( hDbc )
{
GUARD_HDBC( hDbc );
Buffer.setConnection( (OdbcConnection*)hDbc );
- return ((OdbcConnection*)hDbc)->sqlError( State, nativeErrorCode, Buffer,
+ return ((OdbcConnection*)hDbc)->sqlError( State, (int*)nativeErrorCode, Buffer,
Buffer.getLength(), msgLength );
}
if ( hEnv )
- return ((OdbcEnv*)hEnv)->sqlError( State, nativeErrorCode, Buffer,
+ return ((OdbcEnv*)hEnv)->sqlError( State, (int*)nativeErrorCode, Buffer,
Buffer.getLength(), msgLength );

return SQL\_ERROR;

}

Index: OdbcObject.cpp

RCS file: /cvsroot/firebird/OdbcJdbc/OdbcObject.cpp,v
retrieving revision 1.11
diff -u -5 -p -r1.11 OdbcObject.cpp
--- OdbcObject.cpp 25 Jun 2008 09:02:03 -0000 1.11
+++ OdbcObject.cpp 23 Mar 2012 18:07:04 -0000
@@ -288,11 +288,11 @@ SQLRETURN OdbcObject::sqlGetDiagRec(int
{
int n = 1;

for \(OdbcError \*error = errors; error; error = error\-\>next, \+\+n\)
	if \(n == recNumber\)

- return error->sqlGetDiagRec (stateBuffer, nativeCode, msgBuffer, msgBufferLength, msgLength);
+ return error->sqlGetDiagRec (stateBuffer, (int*)nativeCode, msgBuffer, msgBufferLength, msgLength);

strcpy \(\(char\*\) stateBuffer, "00000"\);

if \(msgBuffer\)
	msgBuffer \[0\] = 0;

Commits: ef96afd f6a765e

@firebird-automations
Copy link
Author

Commented by: @alexpotapchenko

Fixed in CVS by another way. Check please.

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.0.2 [ 10465 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants