Issue Details (XML | Word | Printable)

Key: ODBC-142
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Potapchenko
Reporter: Rafael Kitover
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ODBC Driver

needs type casts to compile on Linux

Created: 23/Mar/12 04:44 PM   Updated: 09/Jul/13 11:01 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.2

Environment: cvs version, debian unstable, gcc 4.6.2


 Description  « Hide
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;


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Potapchenko made changes - 24/Mar/12 08:31 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.0.2 [ 10465 ]
Resolution Fixed [ 1 ]
Alexander Potapchenko made changes - 09/Jul/13 11:01 AM
Status Resolved [ 5 ] Closed [ 6 ]