unixODBC/warning-cleanup.patch

1714 lines
78 KiB
Diff
Raw Normal View History

2009-02-20 17:22:19 +00:00
This patch fixes a boatload of bugs in 2.2.14, some but not all of which
would manifest only on 64-bit platforms. All changes were identified by
examining compiler warnings on a Fedora 9 64-bit build.
Submitted upstream 2009-02-16.
diff -Naur unixODBC-2.2.14.orig/DataManager/classISQL.cpp unixODBC-2.2.14/DataManager/classISQL.cpp
--- unixODBC-2.2.14.orig/DataManager/classISQL.cpp 2007-02-12 06:49:33.000000000 -0500
+++ unixODBC-2.2.14/DataManager/classISQL.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -180,7 +180,7 @@
txtSQL->hide();
txtResults->append( qsHorizSep );
- qsHorizSep.sprintf( "\n\n%d rows affected", nRowsAffected );
+ qsHorizSep.sprintf( "\n\n%ld rows affected", (long) nRowsAffected );
txtResults->append( qsHorizSep );
txtResults->setAutoUpdate( TRUE );
diff -Naur unixODBC-2.2.14.orig/DataManagerII/classBrowse.cpp unixODBC-2.2.14/DataManagerII/classBrowse.cpp
--- unixODBC-2.2.14.orig/DataManagerII/classBrowse.cpp 2007-02-12 06:49:33.000000000 -0500
+++ unixODBC-2.2.14/DataManagerII/classBrowse.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -243,7 +243,7 @@
if (SQL_SUCCEEDED(nReturn))
addStatus( QString().sprintf("%s: %d row(s) completed", shortDesc.upper().ascii(), nRowsAffected) ) ;
else
- addStatus( QString().sprintf("%s: %d row(s), ERROR rc=%d, %d row(s) affected", shortDesc.upper().ascii(), listRows.count(), nReturn, nRowsAffected) ) ;
+ addStatus( QString().sprintf("%s: %ld row(s), ERROR rc=%d, %ld row(s) affected", shortDesc.upper().ascii(), (long) listRows.count(), nReturn, (long) nRowsAffected) ) ;
return nRowsAffected ;
}
@@ -293,7 +293,7 @@
return ;
// Confirm delete with user
- if (!OkWithUser( "table row delete", QString().sprintf("Do you want to delete the following %d row(s)?\nROWS: ", listRows.count()) + qsRowsSelected ))
+ if (!OkWithUser( "table row delete", QString().sprintf("Do you want to delete the following %ld row(s)?\nROWS: ", (long) listRows.count()) + qsRowsSelected ))
return ;
// Double check the action to be sure user knows about duplicates that might be affected
@@ -327,7 +327,7 @@
return ;
// Confirm delete with user
- if (!OkWithUser( "table row insert", QString().sprintf("Do you want to insert the following %d row(s)?\nROWS: ", listRows.count()) + qsRowsSelected ))
+ if (!OkWithUser( "table row insert", QString().sprintf("Do you want to insert the following %ld row(s)?\nROWS: ", (long) listRows.count()) + qsRowsSelected ))
return ;
// Build SQL statement with parameter markers
@@ -556,7 +556,7 @@
tableData->setNumRows( nRows );
// Update the status
- addStatus( QString().sprintf( "RUN: %d rows and %d columns affected", nRows, nColumns ) ) ;
+ addStatus( QString().sprintf( "RUN: %ld rows and %d columns affected", (long) nRows, nColumns ) ) ;
}
void classBrowse::ExecHeader( SQLHSTMT hStmt, SWORD nColumns )
diff -Naur unixODBC-2.2.14.orig/DataManagerII/classISQL.cpp unixODBC-2.2.14/DataManagerII/classISQL.cpp
--- unixODBC-2.2.14.orig/DataManagerII/classISQL.cpp 2007-04-17 11:16:14.000000000 -0400
+++ unixODBC-2.2.14/DataManagerII/classISQL.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -322,7 +322,7 @@
txtSQL->hide();
txtResults->setAutoUpdate( TRUE );
txtResults->repaint();
- addStatus( QString().sprintf( "RUN: %d rows and %d columns affected", nRowsAffected, nColumns ) ) ;
+ addStatus( QString().sprintf( "RUN: %ld rows and %d columns affected", (long) nRowsAffected, nColumns ) ) ;
}
#ifdef QT_V4LAYOUT
diff -Naur unixODBC-2.2.14.orig/DriverManager/SQLColAttributesW.c unixODBC-2.2.14/DriverManager/SQLColAttributesW.c
--- unixODBC-2.2.14.orig/DriverManager/SQLColAttributesW.c 2008-09-01 12:38:34.000000000 -0400
+++ unixODBC-2.2.14/DriverManager/SQLColAttributesW.c 2009-02-15 18:34:44.000000000 -0500
@@ -368,7 +368,7 @@
{
if ( CHECK_SQLCOLATTRIBUTE( statement -> connection ))
{
- SQLCHAR *as1;
+ SQLCHAR *as1 = NULL;
/*
* map to the ODBC3 function
@@ -460,7 +460,7 @@
}
else
{
- SQLCHAR *as1;
+ SQLCHAR *as1 = NULL;
switch( field_identifier )
{
diff -Naur unixODBC-2.2.14.orig/DriverManager/SQLConnect.c unixODBC-2.2.14/DriverManager/SQLConnect.c
--- unixODBC-2.2.14.orig/DriverManager/SQLConnect.c 2008-09-29 10:02:43.000000000 -0400
+++ unixODBC-2.2.14/DriverManager/SQLConnect.c 2009-02-15 18:34:44.000000000 -0500
@@ -827,7 +827,7 @@
return hand;
}
-static odbc_dlclose( void *handle )
+static void odbc_dlclose( void *handle )
{
struct lib_count *list, *prev;
diff -Naur unixODBC-2.2.14.orig/DriverManager/SQLCopyDesc.c unixODBC-2.2.14/DriverManager/SQLCopyDesc.c
--- unixODBC-2.2.14.orig/DriverManager/SQLCopyDesc.c 2004-03-30 08:20:11.000000000 -0500
+++ unixODBC-2.2.14/DriverManager/SQLCopyDesc.c 2009-02-15 18:34:44.000000000 -0500
@@ -279,7 +279,7 @@
* get the count from the source field
*/
- ret == SQLGETDESCFIELD( src_descriptor -> connection,
+ ret = SQLGETDESCFIELD( src_descriptor -> connection,
src_descriptor -> driver_desc,
0,
SQL_DESC_COUNT,
@@ -298,7 +298,7 @@
{
if ( header_fields[ i ].field_type == SQL_INTEGER )
{
- ret == SQLGETDESCFIELD( src_descriptor -> connection,
+ ret = SQLGETDESCFIELD( src_descriptor -> connection,
src_descriptor -> driver_desc,
0,
header_fields[ i ].field_identifier,
@@ -308,7 +308,7 @@
}
else if ( header_fields[ i ].field_type == SQL_SMALLINT )
{
- ret == SQLGETDESCFIELD( src_descriptor -> connection,
+ ret = SQLGETDESCFIELD( src_descriptor -> connection,
src_descriptor -> driver_desc,
0,
header_fields[ i ].field_identifier,
@@ -318,7 +318,7 @@
}
if ( header_fields[ i ].field_type == SQL_VARCHAR )
{
- ret == SQLGETDESCFIELD( src_descriptor -> connection,
+ ret = SQLGETDESCFIELD( src_descriptor -> connection,
src_descriptor -> driver_desc,
0,
header_fields[ i ].field_identifier,
@@ -331,7 +331,7 @@
{
if ( header_fields[ i ].field_type == SQL_INTEGER )
{
- ret == SQLSETDESCFIELD( target_descriptor -> connection,
+ ret = SQLSETDESCFIELD( target_descriptor -> connection,
target_descriptor -> driver_desc,
0,
header_fields[ i ].field_identifier,
@@ -340,7 +340,7 @@
}
else if ( header_fields[ i ].field_type == SQL_SMALLINT )
{
- ret == SQLSETDESCFIELD( target_descriptor -> connection,
+ ret = SQLSETDESCFIELD( target_descriptor -> connection,
target_descriptor -> driver_desc,
0,
header_fields[ i ].field_identifier,
@@ -349,7 +349,7 @@
}
else if ( header_fields[ i ].field_type == SQL_VARCHAR )
{
- ret == SQLSETDESCFIELD( target_descriptor -> connection,
+ ret = SQLSETDESCFIELD( target_descriptor -> connection,
target_descriptor -> driver_desc,
0,
header_fields[ i ].field_identifier,
@@ -376,7 +376,7 @@
{
if ( rec_fields[ i ].field_type == SQL_INTEGER )
{
- ret == SQLGETDESCFIELD( src_descriptor -> connection,
+ ret = SQLGETDESCFIELD( src_descriptor -> connection,
src_descriptor -> driver_desc,
rec,
rec_fields[ i ].field_identifier,
@@ -386,7 +386,7 @@
}
else if ( rec_fields[ i ].field_type == SQL_SMALLINT )
{
- ret == SQLGETDESCFIELD( src_descriptor -> connection,
+ ret = SQLGETDESCFIELD( src_descriptor -> connection,
src_descriptor -> driver_desc,
rec,
rec_fields[ i ].field_identifier,
@@ -396,7 +396,7 @@
}
if ( rec_fields[ i ].field_type == SQL_VARCHAR )
{
- ret == SQLGETDESCFIELD( src_descriptor -> connection,
+ ret = SQLGETDESCFIELD( src_descriptor -> connection,
src_descriptor -> driver_desc,
rec,
rec_fields[ i ].field_identifier,
@@ -409,7 +409,7 @@
{
if ( rec_fields[ i ].field_type == SQL_INTEGER )
{
- ret == SQLSETDESCFIELD( target_descriptor -> connection,
+ ret = SQLSETDESCFIELD( target_descriptor -> connection,
target_descriptor -> driver_desc,
rec,
rec_fields[ i ].field_identifier,
@@ -418,7 +418,7 @@
}
else if ( rec_fields[ i ].field_type == SQL_SMALLINT )
{
- ret == SQLSETDESCFIELD( target_descriptor -> connection,
+ ret = SQLSETDESCFIELD( target_descriptor -> connection,
target_descriptor -> driver_desc,
rec,
rec_fields[ i ].field_identifier,
@@ -427,7 +427,7 @@
}
else if ( rec_fields[ i ].field_type == SQL_VARCHAR )
{
- ret == SQLSETDESCFIELD( target_descriptor -> connection,
+ ret = SQLSETDESCFIELD( target_descriptor -> connection,
target_descriptor -> driver_desc,
rec,
rec_fields[ i ].field_identifier,
diff -Naur unixODBC-2.2.14.orig/DriverManager/SQLDriverConnect.c unixODBC-2.2.14/DriverManager/SQLDriverConnect.c
--- unixODBC-2.2.14.orig/DriverManager/SQLDriverConnect.c 2008-09-29 10:02:44.000000000 -0400
+++ unixODBC-2.2.14/DriverManager/SQLDriverConnect.c 2009-02-15 18:34:44.000000000 -0500
@@ -366,7 +366,8 @@
memcpy( *keyword, ptr, len );
(*keyword)[ len ] = '\0';
- (**cp != ';') && (*cp)++;
+ if (**cp != ';')
+ (*cp)++;
ptr = *cp;
if ( strcmp( *keyword, "DRIVER" ) == 0 )
diff -Naur unixODBC-2.2.14.orig/DriverManager/SQLDriversW.c unixODBC-2.2.14/DriverManager/SQLDriversW.c
--- unixODBC-2.2.14.orig/DriverManager/SQLDriversW.c 2008-09-29 10:02:45.000000000 -0400
+++ unixODBC-2.2.14/DriverManager/SQLDriversW.c 2009-02-15 18:34:44.000000000 -0500
@@ -298,7 +298,7 @@
* enumerate the driver attributes
*/
- sprintf( szIniName, "%s/odbcinst.ini", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ));
+ sprintf( szIniName, "%s/odbcinst.ini", odbcinst_system_file_path( b1 ) );
memset( buffer, '\0', sizeof( buffer ));
#ifdef __OS2__
diff -Naur unixODBC-2.2.14.orig/DriverManager/SQLGetDiagField.c unixODBC-2.2.14/DriverManager/SQLGetDiagField.c
--- unixODBC-2.2.14.orig/DriverManager/SQLGetDiagField.c 2008-09-29 10:02:45.000000000 -0400
+++ unixODBC-2.2.14/DriverManager/SQLGetDiagField.c 2009-02-15 18:34:44.000000000 -0500
@@ -314,7 +314,7 @@
else if ( __get_connection( head ) -> unicode_driver &&
CHECK_SQLGETDIAGFIELDW( __get_connection( head )))
{
- SQLWCHAR *s1;
+ SQLWCHAR *s1 = NULL;
if ( buffer_length > 0 )
{
diff -Naur unixODBC-2.2.14.orig/DriverManager/SQLSetPos.c unixODBC-2.2.14/DriverManager/SQLSetPos.c
--- unixODBC-2.2.14.orig/DriverManager/SQLSetPos.c 2003-10-30 13:20:46.000000000 -0500
+++ unixODBC-2.2.14/DriverManager/SQLSetPos.c 2009-02-15 18:34:44.000000000 -0500
@@ -144,11 +144,11 @@
{
sprintf( statement -> msg, "\n\t\tEntry:\
\n\t\t\tStatement = %p\
- \n\t\t\tIrow = %d\
+ \n\t\t\tIrow = %ld\
\n\t\t\tFoption = %d\
\n\t\t\tFlock = %d",
statement,
- irow,
+ (long) irow,
foption,
flock );
diff -Naur unixODBC-2.2.14.orig/DriverManager/__attribute.c unixODBC-2.2.14/DriverManager/__attribute.c
--- unixODBC-2.2.14.orig/DriverManager/__attribute.c 2008-10-17 05:23:51.000000000 -0400
+++ unixODBC-2.2.14/DriverManager/__attribute.c 2009-02-15 18:34:44.000000000 -0500
@@ -1227,6 +1227,7 @@
default:
as = NULL;
+ msg = NULL;
break;
}
@@ -1288,6 +1289,7 @@
default:
as = NULL;
+ msg = NULL;
break;
}
diff -Naur unixODBC-2.2.14.orig/DriverManager/__info.c unixODBC-2.2.14/DriverManager/__info.c
--- unixODBC-2.2.14.orig/DriverManager/__info.c 2008-09-29 10:02:45.000000000 -0400
+++ unixODBC-2.2.14/DriverManager/__info.c 2009-02-15 18:34:44.000000000 -0500
@@ -3062,13 +3062,13 @@
{
if ( strlen((char*) instr ) > LOG_MESSAGE_LEN )
{
- sprintf((char*) ostr, "[%.*s...][length = %d (SQL_NTS)]",
- LOG_MESSAGE_LEN, instr, strlen((char*) instr ));
+ sprintf((char*) ostr, "[%.*s...][length = %ld (SQL_NTS)]",
+ LOG_MESSAGE_LEN, instr, (long) strlen((char*) instr ));
}
else
{
- sprintf((char*) ostr, "[%s][length = %d (SQL_NTS)]",
- instr, strlen((char*) instr ));
+ sprintf((char*) ostr, "[%s][length = %ld (SQL_NTS)]",
+ instr, (long) strlen((char*) instr ));
}
}
diff -Naur unixODBC-2.2.14.orig/Drivers/Postgre7.1/dlg_specific.c unixODBC-2.2.14/Drivers/Postgre7.1/dlg_specific.c
--- unixODBC-2.2.14.orig/Drivers/Postgre7.1/dlg_specific.c 2001-12-04 11:46:19.000000000 -0500
+++ unixODBC-2.2.14/Drivers/Postgre7.1/dlg_specific.c 2009-02-15 18:34:43.000000000 -0500
@@ -21,10 +21,11 @@
#endif
#ifndef WIN32
+# include <string.h>
+# include <ctype.h>
# ifdef UNIXODBC
# include <odbcinst.h>
# else
-# include <string.h>
# include "gpps.h"
# define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f)
# define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d)
diff -Naur unixODBC-2.2.14.orig/Drivers/Postgre7.1/options.c unixODBC-2.2.14/Drivers/Postgre7.1/options.c
--- unixODBC-2.2.14.orig/Drivers/Postgre7.1/options.c 2005-09-12 09:09:41.000000000 -0400
+++ unixODBC-2.2.14/Drivers/Postgre7.1/options.c 2009-02-15 18:34:43.000000000 -0500
@@ -221,12 +221,12 @@
if (stmt) {
SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Set)");
- sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
+ sprintf(option, "fOption=%d, vParam=%ld", fOption, (long) vParam);
SC_log_error(func, option, stmt);
}
if (conn) {
CC_set_error(conn, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Set)");
- sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
+ sprintf(option, "fOption=%d, vParam=%ld", fOption, (long) vParam);
CC_log_error(func, option, conn);
}
diff -Naur unixODBC-2.2.14.orig/Drivers/Postgre7.1/socket.c unixODBC-2.2.14/Drivers/Postgre7.1/socket.c
--- unixODBC-2.2.14.orig/Drivers/Postgre7.1/socket.c 2004-09-22 05:13:39.000000000 -0400
+++ unixODBC-2.2.14/Drivers/Postgre7.1/socket.c 2009-02-15 18:34:43.000000000 -0500
@@ -188,7 +188,7 @@
/*
* cope with different path for debian distrib
*/
-
+int
SOCK_connect_to_unix(SocketClass *self, unsigned short port, char *path )
{
if ( strlen( path ) > 0 )
diff -Naur unixODBC-2.2.14.orig/Drivers/Postgre7.1/tuple.c unixODBC-2.2.14/Drivers/Postgre7.1/tuple.c
--- unixODBC-2.2.14.orig/Drivers/Postgre7.1/tuple.c 2001-10-17 12:40:10.000000000 -0400
+++ unixODBC-2.2.14/Drivers/Postgre7.1/tuple.c 2009-02-15 18:34:43.000000000 -0500
@@ -49,7 +49,7 @@
{
char buffer[15];
- sprintf(buffer,"%ld", value);
+ sprintf(buffer,"%ld", (long) value);
tuple_field->len = strlen(buffer)+1;
/* +1 ... is this correct (better be on the save side-...) */
diff -Naur unixODBC-2.2.14.orig/Drivers/PostgreSQL/options.c unixODBC-2.2.14/Drivers/PostgreSQL/options.c
--- unixODBC-2.2.14.orig/Drivers/PostgreSQL/options.c 2005-09-12 09:09:41.000000000 -0400
+++ unixODBC-2.2.14/Drivers/PostgreSQL/options.c 2009-02-15 18:34:43.000000000 -0500
@@ -232,13 +232,13 @@
if (stmt) {
stmt->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
stmt->errormsg = "Unknown statement option (Set)";
- sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
+ sprintf(option, "fOption=%d, vParam=%ld", fOption, (long) vParam);
SC_log_error(func, option, stmt);
}
if (conn) {
conn->errornumber = STMT_NOT_IMPLEMENTED_ERROR;
conn->errormsg = "Unknown statement option (Set)";
- sprintf(option, "fOption=%d, vParam=%ld", fOption, vParam);
+ sprintf(option, "fOption=%d, vParam=%ld", fOption, (long) vParam);
CC_log_error(func, option, conn);
}
diff -Naur unixODBC-2.2.14.orig/Drivers/PostgreSQL/socket.c unixODBC-2.2.14/Drivers/PostgreSQL/socket.c
--- unixODBC-2.2.14.orig/Drivers/PostgreSQL/socket.c 2003-02-18 13:46:49.000000000 -0500
+++ unixODBC-2.2.14/Drivers/PostgreSQL/socket.c 2009-02-15 18:34:43.000000000 -0500
@@ -191,7 +191,7 @@
/*
* cope with different path for debian distrib
*/
-
+int
SOCK_connect_to_unix(SocketClass *self, unsigned short port, char *path )
{
if ( strlen( path ) > 0 )
diff -Naur unixODBC-2.2.14.orig/Drivers/PostgreSQL/tuple.c unixODBC-2.2.14/Drivers/PostgreSQL/tuple.c
--- unixODBC-2.2.14.orig/Drivers/PostgreSQL/tuple.c 2001-10-17 12:40:11.000000000 -0400
+++ unixODBC-2.2.14/Drivers/PostgreSQL/tuple.c 2009-02-15 18:34:43.000000000 -0500
@@ -49,7 +49,7 @@
{
char buffer[15];
- sprintf(buffer,"%ld", value);
+ sprintf(buffer,"%ld", (long) value);
tuple_field->len = strlen(buffer)+1;
/* +1 ... is this correct (better be on the save side-...) */
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLAllocConnect.c unixODBC-2.2.14/Drivers/template/SQLAllocConnect.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLAllocConnect.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLAllocConnect.c 2009-02-15 18:34:44.000000000 -0500
@@ -26,7 +26,7 @@
if( SQL_NULL_HENV == hEnv )
return SQL_INVALID_HANDLE;
- sprintf((char*) hEnv->szSqlMsg, "hEnv = $%08lX phDbc = $%08lX", hEnv, phDbc );
+ sprintf((char*) hEnv->szSqlMsg, "hEnv = $%08lX phDbc = $%08lX", (long) hEnv, (long) phDbc );
logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hEnv->szSqlMsg );
if( SQL_NULL_HDBC == phDbc )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLAllocStmt.c unixODBC-2.2.14/Drivers/template/SQLAllocStmt.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLAllocStmt.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLAllocStmt.c 2009-02-15 18:34:44.000000000 -0500
@@ -25,7 +25,7 @@
return SQL_INVALID_HANDLE;
}
- sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", (long) hDbc );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg );
if( NULL == phStmt )
@@ -45,7 +45,7 @@
}
/* initialize memory */
- sprintf((char*) hDbc->szSqlMsg, "*phstmt = $%08lX", *phStmt );
+ sprintf((char*) hDbc->szSqlMsg, "*phstmt = $%08lX", (long) *phStmt );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg );
memset( *phStmt, 0, sizeof(DRVSTMT) ); /* SAFETY */
@@ -55,7 +55,7 @@
(*phStmt)->pNext = NULL;
(*phStmt)->pPrev = NULL;
(*phStmt)->pszQuery = NULL;
- sprintf((char*)(*phStmt)->szCursorName, "CUR_%08lX", *phStmt );
+ sprintf((char*)(*phStmt)->szCursorName, "CUR_%08lX", (long) *phStmt );
/* ADD TO DBCs STATEMENT LIST */
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLBindCol.c unixODBC-2.2.14/Drivers/template/SQLBindCol.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLBindCol.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLBindCol.c 2009-02-15 18:34:44.000000000 -0500
@@ -26,7 +26,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt=$%08lX nCol=%5d", hStmt, nCol );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt=$%08lX nCol=%5d", (long) hStmt, nCol );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_INFO, LOG_INFO,(char*) hStmt->szSqlMsg );
if ( hStmt->hStmtExtras->nRows == 0 )
@@ -37,7 +37,7 @@
if ( nCol < 1 || nCol > hStmt->hStmtExtras->nCols )
{
- sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Column %d is out of range. Range is 1 - %s", nCol, hStmt->hStmtExtras->nCols );
+ sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Column %d is out of range. Range is 1 - %d", nCol, hStmt->hStmtExtras->nCols );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
return SQL_ERROR;
}
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLBindParameter.c unixODBC-2.2.14/Drivers/template/SQLBindParameter.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLBindParameter.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLBindParameter.c 2009-02-15 18:34:43.000000000 -0500
@@ -30,7 +30,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt=$%08lX nParameterNumber=%d nIOType=%d nBufferType=%d nParamType=%d nParamLength=%d nScale=%d pData=$%08lX nBufferLength=%d *pnLengthOrIndicator=$%08lX",hStmt,nParameterNumber,nIOType,nBufferType,nParamType,nParamLength,nScale,pData,nBufferLength, *pnLengthOrIndicator );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt=$%08lX nParameterNumber=%d nIOType=%d nBufferType=%d nParamType=%d nParamLength=%ld nScale=%d pData=$%08lX nBufferLength=%ld *pnLengthOrIndicator=$%08lX",(long) hStmt,nParameterNumber,nIOType,nBufferType,nParamType,(long) nParamLength,nScale,(long) pData,(long) nBufferLength, *pnLengthOrIndicator );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLBrowseConnect.c unixODBC-2.2.14/Drivers/template/SQLBrowseConnect.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLBrowseConnect.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLBrowseConnect.c 2009-02-15 18:34:44.000000000 -0500
@@ -26,7 +26,7 @@
if ( hDbc == NULL )
return SQL_INVALID_HANDLE;
- sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", (long) hDbc );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, "SQL_ERROR This function not currently supported" );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLBulkOperations.c unixODBC-2.2.14/Drivers/template/SQLBulkOperations.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLBulkOperations.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLBulkOperations.c 2009-02-15 18:34:44.000000000 -0500
@@ -21,7 +21,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/* OK */
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLCancel.c unixODBC-2.2.14/Drivers/template/SQLCancel.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLCancel.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLCancel.c 2009-02-15 18:34:44.000000000 -0500
@@ -20,7 +20,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLCloseCursor.c unixODBC-2.2.14/Drivers/template/SQLCloseCursor.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLCloseCursor.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLCloseCursor.c 2009-02-15 18:34:44.000000000 -0500
@@ -20,7 +20,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLColAttributes.c unixODBC-2.2.14/Drivers/template/SQLColAttributes.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLColAttributes.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLColAttributes.c 2009-02-15 18:34:44.000000000 -0500
@@ -27,7 +27,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/**************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLColumnPrivileges.c unixODBC-2.2.14/Drivers/template/SQLColumnPrivileges.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLColumnPrivileges.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLColumnPrivileges.c 2009-02-15 18:34:44.000000000 -0500
@@ -28,7 +28,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLColumns.c unixODBC-2.2.14/Drivers/template/SQLColumns.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLColumns.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLColumns.c 2009-02-15 18:34:44.000000000 -0500
@@ -76,7 +76,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( szTableName == NULL || szTableName[0] == '\0' )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLConnect.c unixODBC-2.2.14/Drivers/template/SQLConnect.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLConnect.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLConnect.c 2009-02-15 18:34:44.000000000 -0500
@@ -31,7 +31,7 @@
if( SQL_NULL_HDBC == hDbc )
return SQL_INVALID_HANDLE;
- sprintf((char*) hDbc->szSqlMsg, "hDbc=$%08lX 3zDataSource=(%s)", hDbc, szDataSource );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc=$%08lX 3zDataSource=(%s)", (long) hDbc, szDataSource );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg );
if( hDbc->bConnected == 1 )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLDescribeCol.c unixODBC-2.2.14/Drivers/template/SQLDescribeCol.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLDescribeCol.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLDescribeCol.c 2009-02-15 18:34:44.000000000 -0500
@@ -38,7 +38,7 @@
}
if ( nCol < 1 || nCol > hStmt->hStmtExtras->nCols )
{
- sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Column %d is out of range. Range is 1 - %s", nCol, hStmt->hStmtExtras->nCols );
+ sprintf((char*) hStmt->szSqlMsg, "SQL_ERROR Column %d is out of range. Range is 1 - %d", nCol, hStmt->hStmtExtras->nCols );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
return SQL_ERROR;
}
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLDescribeParam.c unixODBC-2.2.14/Drivers/template/SQLDescribeParam.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLDescribeParam.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLDescribeParam.c 2009-02-15 18:34:44.000000000 -0500
@@ -33,7 +33,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLDisconnect.c unixODBC-2.2.14/Drivers/template/SQLDisconnect.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLDisconnect.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLDisconnect.c 2009-02-15 18:34:44.000000000 -0500
@@ -20,7 +20,7 @@
if( NULL == hDbc )
return SQL_INVALID_HANDLE;
- sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", (long) hDbc );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, (char*)hDbc->szSqlMsg );
if( hDbc->bConnected == 0 )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLDriverConnect.c unixODBC-2.2.14/Drivers/template/SQLDriverConnect.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLDriverConnect.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLDriverConnect.c 2009-02-15 18:34:43.000000000 -0500
@@ -41,7 +41,7 @@
if( NULL == hDbc )
return SQL_INVALID_HANDLE;
- sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", (long) hDbc );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLExecDirect.c unixODBC-2.2.14/Drivers/template/SQLExecDirect.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLExecDirect.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLExecDirect.c 2009-02-15 18:34:44.000000000 -0500
@@ -23,7 +23,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/* prepare command */
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLExecute.c unixODBC-2.2.14/Drivers/template/SQLExecute.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLExecute.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLExecute.c 2009-02-15 18:34:43.000000000 -0500
@@ -24,7 +24,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if( hStmt->pszQuery == NULL )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLExtendedFetch.c unixODBC-2.2.14/Drivers/template/SQLExtendedFetch.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLExtendedFetch.c 2007-11-29 07:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLExtendedFetch.c 2009-02-15 18:34:44.000000000 -0500
@@ -24,7 +24,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLFetch.c unixODBC-2.2.14/Drivers/template/SQLFetch.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLFetch.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLFetch.c 2009-02-15 18:34:44.000000000 -0500
@@ -22,7 +22,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( hStmt->hStmtExtras->nRows < 1 )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLFetchScroll.c unixODBC-2.2.14/Drivers/template/SQLFetchScroll.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLFetchScroll.c 2007-11-29 07:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLFetchScroll.c 2009-02-15 18:34:44.000000000 -0500
@@ -22,7 +22,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLForeignKeys.c unixODBC-2.2.14/Drivers/template/SQLForeignKeys.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLForeignKeys.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLForeignKeys.c 2009-02-15 18:34:43.000000000 -0500
@@ -32,7 +32,7 @@
if( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLFreeConnect.c unixODBC-2.2.14/Drivers/template/SQLFreeConnect.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLFreeConnect.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLFreeConnect.c 2009-02-15 18:34:44.000000000 -0500
@@ -24,7 +24,7 @@
if( NULL == hDbc )
return SQL_INVALID_HANDLE;
- sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", (long) hDbc );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING, (char*)hDbc->szSqlMsg );
if( hDbc->bConnected )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLFreeEnv.c unixODBC-2.2.14/Drivers/template/SQLFreeEnv.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLFreeEnv.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLFreeEnv.c 2009-02-15 18:34:44.000000000 -0500
@@ -23,7 +23,7 @@
if( hEnv == SQL_NULL_HENV )
return SQL_INVALID_HANDLE;
- sprintf((char*) hEnv->szSqlMsg, "hEnv = $%08lX", hEnv );
+ sprintf((char*) hEnv->szSqlMsg, "hEnv = $%08lX", (long) hEnv );
logPushMsg( hEnv->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hEnv->szSqlMsg );
if ( hEnv->hFirstDbc != NULL )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLFreeStmt.c unixODBC-2.2.14/Drivers/template/SQLFreeStmt.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLFreeStmt.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLFreeStmt.c 2009-02-15 18:34:44.000000000 -0500
@@ -21,7 +21,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/*********
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLGetConnectAttr.c unixODBC-2.2.14/Drivers/template/SQLGetConnectAttr.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLGetConnectAttr.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLGetConnectAttr.c 2009-02-15 18:34:43.000000000 -0500
@@ -26,7 +26,7 @@
if( NULL == hDbc )
return SQL_INVALID_HANDLE;
- sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", (long) hDbc );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLGetConnectOption.c unixODBC-2.2.14/Drivers/template/SQLGetConnectOption.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLGetConnectOption.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLGetConnectOption.c 2009-02-15 18:34:44.000000000 -0500
@@ -22,7 +22,7 @@
if( NULL == hDbc )
return SQL_INVALID_HANDLE;
- sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", (long) hDbc );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLGetCursorName.c unixODBC-2.2.14/Drivers/template/SQLGetCursorName.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLGetCursorName.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLGetCursorName.c 2009-02-15 18:34:44.000000000 -0500
@@ -25,7 +25,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( NULL == szCursor )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLGetStmtAttr.c unixODBC-2.2.14/Drivers/template/SQLGetStmtAttr.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLGetStmtAttr.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLGetStmtAttr.c 2009-02-15 18:34:44.000000000 -0500
@@ -25,7 +25,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLGetStmtOption.c unixODBC-2.2.14/Drivers/template/SQLGetStmtOption.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLGetStmtOption.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLGetStmtOption.c 2009-02-15 18:34:44.000000000 -0500
@@ -22,7 +22,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLGetTypeInfo.c unixODBC-2.2.14/Drivers/template/SQLGetTypeInfo.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLGetTypeInfo.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLGetTypeInfo.c 2009-02-15 18:34:44.000000000 -0500
@@ -21,7 +21,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLMoreResults.c unixODBC-2.2.14/Drivers/template/SQLMoreResults.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLMoreResults.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLMoreResults.c 2009-02-15 18:34:44.000000000 -0500
@@ -20,7 +20,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLNativeSql.c unixODBC-2.2.14/Drivers/template/SQLNativeSql.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLNativeSql.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLNativeSql.c 2009-02-15 18:34:44.000000000 -0500
@@ -25,7 +25,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLNumParams.c unixODBC-2.2.14/Drivers/template/SQLNumParams.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLNumParams.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLNumParams.c 2009-02-15 18:34:44.000000000 -0500
@@ -21,7 +21,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLNumResultCols.c unixODBC-2.2.14/Drivers/template/SQLNumResultCols.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLNumResultCols.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLNumResultCols.c 2009-02-15 18:34:44.000000000 -0500
@@ -21,7 +21,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( hStmt->hStmtExtras->nRows < 1 )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLParamData.c unixODBC-2.2.14/Drivers/template/SQLParamData.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLParamData.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLParamData.c 2009-02-15 18:34:43.000000000 -0500
@@ -21,7 +21,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLParamOptions.c unixODBC-2.2.14/Drivers/template/SQLParamOptions.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLParamOptions.c 2007-02-12 06:49:35.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLParamOptions.c 2009-02-15 18:34:44.000000000 -0500
@@ -22,7 +22,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLPrepare.c unixODBC-2.2.14/Drivers/template/SQLPrepare.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLPrepare.c 2001-12-13 08:00:32.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLPrepare.c 2009-02-15 18:34:43.000000000 -0500
@@ -22,7 +22,7 @@
if ( NULL == hStmt )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( szSqlStr == NULL )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLPrimaryKeys.c unixODBC-2.2.14/Drivers/template/SQLPrimaryKeys.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLPrimaryKeys.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLPrimaryKeys.c 2009-02-15 18:34:44.000000000 -0500
@@ -26,7 +26,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLProcedureColumns.c unixODBC-2.2.14/Drivers/template/SQLProcedureColumns.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLProcedureColumns.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLProcedureColumns.c 2009-02-15 18:34:44.000000000 -0500
@@ -29,7 +29,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLProcedures.c unixODBC-2.2.14/Drivers/template/SQLProcedures.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLProcedures.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLProcedures.c 2009-02-15 18:34:44.000000000 -0500
@@ -27,7 +27,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLPutData.c unixODBC-2.2.14/Drivers/template/SQLPutData.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLPutData.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLPutData.c 2009-02-15 18:34:44.000000000 -0500
@@ -25,7 +25,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLRowCount.c unixODBC-2.2.14/Drivers/template/SQLRowCount.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLRowCount.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLRowCount.c 2009-02-15 18:34:44.000000000 -0500
@@ -21,7 +21,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( NULL == pnRowCount )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLSetCursorName.c unixODBC-2.2.14/Drivers/template/SQLSetCursorName.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLSetCursorName.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLSetCursorName.c 2009-02-15 18:34:44.000000000 -0500
@@ -22,7 +22,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( NULL == szCursor || 0 == isalpha(*szCursor) )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLSetParam.c unixODBC-2.2.14/Drivers/template/SQLSetParam.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLSetParam.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLSetParam.c 2009-02-15 18:34:44.000000000 -0500
@@ -24,7 +24,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( NULL == hStmt->pszQuery )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLSetPos.c unixODBC-2.2.14/Drivers/template/SQLSetPos.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLSetPos.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLSetPos.c 2009-02-15 18:34:44.000000000 -0500
@@ -23,7 +23,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/* OK */
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLSetScrollOptions.c unixODBC-2.2.14/Drivers/template/SQLSetScrollOptions.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLSetScrollOptions.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLSetScrollOptions.c 2009-02-15 18:34:44.000000000 -0500
@@ -24,7 +24,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLSetStmtAttr.c unixODBC-2.2.14/Drivers/template/SQLSetStmtAttr.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLSetStmtAttr.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLSetStmtAttr.c 2009-02-15 18:34:44.000000000 -0500
@@ -24,7 +24,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLSetStmtOption.c unixODBC-2.2.14/Drivers/template/SQLSetStmtOption.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLSetStmtOption.c 2007-11-29 07:00:36.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLSetStmtOption.c 2009-02-15 18:34:44.000000000 -0500
@@ -22,7 +22,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLSpecialColumns.c unixODBC-2.2.14/Drivers/template/SQLSpecialColumns.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLSpecialColumns.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLSpecialColumns.c 2009-02-15 18:34:44.000000000 -0500
@@ -41,7 +41,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLStatistics.c unixODBC-2.2.14/Drivers/template/SQLStatistics.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLStatistics.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLStatistics.c 2009-02-15 18:34:44.000000000 -0500
@@ -62,7 +62,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
if ( szTableName == NULL )
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLTablePrivileges.c unixODBC-2.2.14/Drivers/template/SQLTablePrivileges.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLTablePrivileges.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLTablePrivileges.c 2009-02-15 18:34:44.000000000 -0500
@@ -26,7 +26,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLTables.c unixODBC-2.2.14/Drivers/template/SQLTables.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLTables.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLTables.c 2009-02-15 18:34:44.000000000 -0500
@@ -57,7 +57,7 @@
if( hStmt == SQL_NULL_HSTMT )
return SQL_INVALID_HANDLE;
- sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", hStmt );
+ sprintf((char*) hStmt->szSqlMsg, "hStmt = $%08lX", (long) hStmt );
logPushMsg( hStmt->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hStmt->szSqlMsg );
/**************************
diff -Naur unixODBC-2.2.14.orig/Drivers/template/SQLTransact.c unixODBC-2.2.14/Drivers/template/SQLTransact.c
--- unixODBC-2.2.14.orig/Drivers/template/SQLTransact.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/SQLTransact.c 2009-02-15 18:34:44.000000000 -0500
@@ -23,7 +23,7 @@
if ( hDbc == SQL_NULL_HDBC )
return SQL_INVALID_HANDLE;
- sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", hDbc );
+ sprintf((char*) hDbc->szSqlMsg, "hDbc = $%08lX", (long) hDbc );
logPushMsg( hDbc->hLog, __FILE__, __FILE__, __LINE__, LOG_WARNING, LOG_WARNING,(char*) hDbc->szSqlMsg );
diff -Naur unixODBC-2.2.14.orig/Drivers/template/_GetData.c unixODBC-2.2.14/Drivers/template/_GetData.c
--- unixODBC-2.2.14.orig/Drivers/template/_GetData.c 2001-12-13 08:00:33.000000000 -0500
+++ unixODBC-2.2.14/Drivers/template/_GetData.c 2009-02-15 18:34:44.000000000 -0500
@@ -89,7 +89,7 @@
break;
case SQL_C_FLOAT:
- sscanf( pSourceData, "%g", pTarget );
+ sscanf( pSourceData, "%g", (float *) pTarget );
if ( NULL != pnLengthOrIndicator )
*pnLengthOrIndicator = sizeof( float );
break;
diff -Naur unixODBC-2.2.14.orig/cur/SQLAllocHandle.c unixODBC-2.2.14/cur/SQLAllocHandle.c
--- unixODBC-2.2.14.orig/cur/SQLAllocHandle.c 2005-07-08 08:11:23.000000000 -0400
+++ unixODBC-2.2.14/cur/SQLAllocHandle.c 2009-02-15 18:34:44.000000000 -0500
@@ -148,4 +148,6 @@
}
break;
}
+
+ return SQL_ERROR;
}
diff -Naur unixODBC-2.2.14.orig/cur/SQLEndTran.c unixODBC-2.2.14/cur/SQLEndTran.c
--- unixODBC-2.2.14.orig/cur/SQLEndTran.c 2001-10-17 12:40:15.000000000 -0400
+++ unixODBC-2.2.14/cur/SQLEndTran.c 2009-02-15 18:34:44.000000000 -0500
@@ -54,6 +54,7 @@
/*
* the driver manager will not call this
*/
+ return SQL_ERROR;
break;
case SQL_HANDLE_DBC:
diff -Naur unixODBC-2.2.14.orig/cur/SQLError.c unixODBC-2.2.14/cur/SQLError.c
--- unixODBC-2.2.14.orig/cur/SQLError.c 2008-01-02 10:10:33.000000000 -0500
+++ unixODBC-2.2.14/cur/SQLError.c 2009-02-15 18:34:44.000000000 -0500
@@ -160,4 +160,6 @@
return SQL_NO_DATA;
}
+
+ return SQL_ERROR;
}
diff -Naur unixODBC-2.2.14.orig/cur/SQLExtendedFetch.c unixODBC-2.2.14/cur/SQLExtendedFetch.c
--- unixODBC-2.2.14.orig/cur/SQLExtendedFetch.c 2008-01-22 12:51:54.000000000 -0500
+++ unixODBC-2.2.14/cur/SQLExtendedFetch.c 2009-02-15 18:34:44.000000000 -0500
@@ -612,7 +612,7 @@
}
else if ( ret == SQL_FETCH_PART_ROWSET )
{
- cl_statement -> rowset_position == CL_AFTER_END;
+ cl_statement -> rowset_position = CL_AFTER_END;
ret = SQL_SUCCESS;
}
break;
diff -Naur unixODBC-2.2.14.orig/cur/SQLFreeHandle.c unixODBC-2.2.14/cur/SQLFreeHandle.c
--- unixODBC-2.2.14.orig/cur/SQLFreeHandle.c 2004-07-24 13:55:38.000000000 -0400
+++ unixODBC-2.2.14/cur/SQLFreeHandle.c 2009-02-15 18:34:44.000000000 -0500
@@ -122,5 +122,7 @@
*/
return SQL_ERROR;
}
+
+ return SQL_ERROR;
}
diff -Naur unixODBC-2.2.14.orig/cur/SQLGetStmtAttr.c unixODBC-2.2.14/cur/SQLGetStmtAttr.c
--- unixODBC-2.2.14.orig/cur/SQLGetStmtAttr.c 2005-10-27 13:54:49.000000000 -0400
+++ unixODBC-2.2.14/cur/SQLGetStmtAttr.c 2009-02-15 18:34:44.000000000 -0500
@@ -110,7 +110,7 @@
break;
case SQL_ATTR_ROWS_FETCHED_PTR:
- *(( SQLUINTEGER ** ) value ) = cl_statement -> rows_fetched_ptr;
+ *(( SQLULEN ** ) value ) = cl_statement -> rows_fetched_ptr;
break;
case SQL_ATTR_FETCH_BOOKMARK_PTR:
diff -Naur unixODBC-2.2.14.orig/cur/SQLGetStmtOption.c unixODBC-2.2.14/cur/SQLGetStmtOption.c
--- unixODBC-2.2.14.orig/cur/SQLGetStmtOption.c 2005-10-27 13:54:49.000000000 -0400
+++ unixODBC-2.2.14/cur/SQLGetStmtOption.c 2009-02-15 18:34:44.000000000 -0500
@@ -100,7 +100,7 @@
break;
case SQL_ATTR_ROWS_FETCHED_PTR:
- *(( SQLUINTEGER ** ) value ) = cl_statement -> rows_fetched_ptr;
+ *(( SQLULEN ** ) value ) = cl_statement -> rows_fetched_ptr;
break;
case SQL_ATTR_USE_BOOKMARKS:
diff -Naur unixODBC-2.2.14.orig/cur/SQLSetStmtAttr.c unixODBC-2.2.14/cur/SQLSetStmtAttr.c
--- unixODBC-2.2.14.orig/cur/SQLSetStmtAttr.c 2005-10-27 13:54:49.000000000 -0400
+++ unixODBC-2.2.14/cur/SQLSetStmtAttr.c 2009-02-15 18:34:44.000000000 -0500
@@ -142,7 +142,7 @@
break;
case SQL_ATTR_ROWS_FETCHED_PTR:
- cl_statement -> rows_fetched_ptr = ( SQLUINTEGER * ) value;
+ cl_statement -> rows_fetched_ptr = ( SQLULEN * ) value;
break;
case SQL_ATTR_SIMULATE_CURSOR:
diff -Naur unixODBC-2.2.14.orig/cur/SQLSetStmtOption.c unixODBC-2.2.14/cur/SQLSetStmtOption.c
--- unixODBC-2.2.14.orig/cur/SQLSetStmtOption.c 2005-10-27 13:54:49.000000000 -0400
+++ unixODBC-2.2.14/cur/SQLSetStmtOption.c 2009-02-15 18:34:44.000000000 -0500
@@ -145,7 +145,7 @@
break;
case SQL_ATTR_ROWS_FETCHED_PTR:
- cl_statement -> rows_fetched_ptr = ( SQLUINTEGER * ) value;
+ cl_statement -> rows_fetched_ptr = ( SQLULEN * ) value;
break;
case SQL_ATTR_USE_BOOKMARKS:
diff -Naur unixODBC-2.2.14.orig/cur/cursorlibrary.h unixODBC-2.2.14/cur/cursorlibrary.h
--- unixODBC-2.2.14.orig/cur/cursorlibrary.h 2007-11-29 07:00:36.000000000 -0500
+++ unixODBC-2.2.14/cur/cursorlibrary.h 2009-02-15 18:34:44.000000000 -0500
@@ -75,7 +75,7 @@
SQLUINTEGER rowset_size;
SQLUINTEGER simulate_cursor;
SQLUINTEGER use_bookmarks;
- SQLUINTEGER *rows_fetched_ptr;
+ SQLULEN *rows_fetched_ptr;
SQLUSMALLINT *row_status_ptr;
SQLCHAR cursor_name[ MAX_CURSOR_NAME + 1 ];
CLBCOL *bound_columns;
diff -Naur unixODBC-2.2.14.orig/exe/isql.c unixODBC-2.2.14/exe/isql.c
--- unixODBC-2.2.14.orig/exe/isql.c 2008-06-16 07:03:43.000000000 -0400
+++ unixODBC-2.2.14/exe/isql.c 2009-02-15 18:34:43.000000000 -0500
@@ -1450,11 +1450,11 @@
printf( (char*)szSepLine );
SQLRowCount( hStmt, &nRowsAffected );
- printf( "SQLRowCount returns %d\n", nRowsAffected );
+ printf( "SQLRowCount returns %ld\n", (long) nRowsAffected );
if ( nRows )
{
- printf( "%d rows fetched\n", nRows );
+ printf( "%ld rows fetched\n", (long) nRows );
}
}
diff -Naur unixODBC-2.2.14.orig/exe/iusql.c unixODBC-2.2.14/exe/iusql.c
--- unixODBC-2.2.14.orig/exe/iusql.c 2008-09-01 11:10:40.000000000 -0400
+++ unixODBC-2.2.14/exe/iusql.c 2009-02-15 18:34:43.000000000 -0500
@@ -742,7 +742,7 @@
strcat((char*) szSepLine,(char*) szColumn );
/* HDR */
- sprintf((char*) szColumn, "| %-*s", max( nMaxLength, strlen((char*)szColumnName) ), (char*)szColumnName );
+ sprintf((char*) szColumn, "| %-*s", (int) max( nMaxLength, strlen((char*)szColumnName) ), (char*)szColumnName );
strcat((char*) szHdrLine,(char*) szColumn );
}
strcat((char*) szSepLine, "+\n" );
@@ -817,7 +817,7 @@
}
else
{
- sprintf((char*) szColumn, "| %-*s", max( nMaxLength, strlen((char*) szColumnName) ), "" );
+ sprintf((char*) szColumn, "| %-*s", (int) max( nMaxLength, strlen((char*) szColumnName) ), "" );
}
fputs((char*) szColumn, stdout );
}
@@ -841,11 +841,11 @@
printf( (char*)szSepLine );
SQLRowCount( hStmt, &nRowsAffected );
- printf( "SQLRowCount returns %d\n", nRowsAffected );
+ printf( "SQLRowCount returns %ld\n", (long) nRowsAffected );
if ( nRows )
{
- printf( "%d rows fetched\n", nRows );
+ printf( "%ld rows fetched\n", (long) nRows );
}
}
diff -Naur unixODBC-2.2.14.orig/exe/odbc-config.c unixODBC-2.2.14/exe/odbc-config.c
--- unixODBC-2.2.14.orig/exe/odbc-config.c 2008-05-20 08:58:17.000000000 -0400
+++ unixODBC-2.2.14/exe/odbc-config.c 2009-02-15 18:34:43.000000000 -0500
@@ -160,7 +160,7 @@
static void ulen( void )
{
- printf( "-DSIZEOF_SQLULEN=%d\n", sizeof( SQLULEN ));
+ printf( "-DSIZEOF_SQLULEN=%d\n", (int) sizeof( SQLULEN ));
}
int main( int argc, char **argv )
diff -Naur unixODBC-2.2.14.orig/exe/odbcinst.c unixODBC-2.2.14/exe/odbcinst.c
--- unixODBC-2.2.14.orig/exe/odbcinst.c 2008-11-19 10:27:34.000000000 -0500
+++ unixODBC-2.2.14/exe/odbcinst.c 2009-02-15 18:34:43.000000000 -0500
@@ -456,7 +456,7 @@
printf( "unixODBC " VERSION "\n" );
*szFileName = '\0';
- sprintf( szFileName, "%s/odbcinst.ini", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ));
+ sprintf( szFileName, "%s/odbcinst.ini", odbcinst_system_file_path( b1 ) );
printf( "DRIVERS............: %s\n", szFileName );
*szFileName = '\0';
@@ -471,9 +471,9 @@
_odbcinst_UserINI( szFileName, FALSE );
printf( "USER DATA SOURCES..: %s\n", szFileName );
- printf( "SQLULEN Size.......: %d\n", sizeof( SQLULEN ));
- printf( "SQLLEN Size........: %d\n", sizeof( SQLLEN ));
- printf( "SQLSETPOSIROW Size.: %d\n", sizeof( SQLSETPOSIROW ));
+ printf( "SQLULEN Size.......: %d\n", (int) sizeof( SQLULEN ));
+ printf( "SQLLEN Size........: %d\n", (int) sizeof( SQLLEN ));
+ printf( "SQLSETPOSIROW Size.: %d\n", (int) sizeof( SQLSETPOSIROW ));
}
int main( int argc, char *argv[] )
diff -Naur unixODBC-2.2.14.orig/extras/snprintf.c unixODBC-2.2.14/extras/snprintf.c
--- unixODBC-2.2.14.orig/extras/snprintf.c 2008-05-13 09:02:28.000000000 -0400
+++ unixODBC-2.2.14/extras/snprintf.c 2009-02-15 18:34:43.000000000 -0500
@@ -533,7 +533,7 @@
return result;
}
-static LDOUBLE pow10 (int exponent)
+static LDOUBLE mypow10 (int exponent)
{
LDOUBLE result = 1;
@@ -546,7 +546,7 @@
return result;
}
-static long round (LDOUBLE value)
+static long myround (LDOUBLE value)
{
long intpart;
@@ -607,12 +607,12 @@
/* We "cheat" by converting the fractional part to integer by
* multiplying by a factor of 10
*/
- fracpart = round ((pow10 (max)) * (ufvalue - intpart));
+ fracpart = myround ((mypow10 (max)) * (ufvalue - intpart));
- if (fracpart >= pow10 (max))
+ if (fracpart >= mypow10 (max))
{
intpart++;
- fracpart -= pow10 (max);
+ fracpart -= mypow10 (max);
}
#ifdef DEBUG_SNPRINTF
diff -Naur unixODBC-2.2.14.orig/odbcinst/SQLGetInstalledDrivers.c unixODBC-2.2.14/odbcinst/SQLGetInstalledDrivers.c
--- unixODBC-2.2.14.orig/odbcinst/SQLGetInstalledDrivers.c 2008-09-04 07:08:59.000000000 -0400
+++ unixODBC-2.2.14/odbcinst/SQLGetInstalledDrivers.c 2009-02-15 18:34:44.000000000 -0500
@@ -27,7 +27,7 @@
#ifdef VMS
sprintf( szIniName, "%s:%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) );
#else
- sprintf( szIniName, "%s/%d", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) );
+ sprintf( szIniName, "%s/%s", odbcinst_system_file_path( b1 ), odbcinst_system_file_name( b2 ) );
#endif
#ifdef __OS2__
diff -Naur unixODBC-2.2.14.orig/odbcinstQ/CStatDetails.cpp unixODBC-2.2.14/odbcinstQ/CStatDetails.cpp
--- unixODBC-2.2.14.orig/odbcinstQ/CStatDetails.cpp 2008-06-30 09:20:44.000000000 -0400
+++ unixODBC-2.2.14/odbcinstQ/CStatDetails.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -70,11 +70,11 @@
nHandles = uodbc_get_stats( hStats, aPIDs[nPID].value.l_value, aHandles, MAXHANDLES );
if ( nHandles > 0 )
{
- qs.sprintf( "%d", aPIDs[nPID].value.l_value );
+ qs.sprintf( "%ld", aPIDs[nPID].value.l_value );
pTable->setText( nPID, 0, qs );
for ( nHandle = 0; nHandle < MAXHANDLES; nHandle++ )
{
- qs.sprintf( "%d", aHandles[nHandle].value.l_value );
+ qs.sprintf( "%ld", aHandles[nHandle].value.l_value );
pTable->setText( nPID, nHandle + 1, qs );
}
}
diff -Naur unixODBC-2.2.14.orig/odbcinstQ/CStatSummary.cpp unixODBC-2.2.14/odbcinstQ/CStatSummary.cpp
--- unixODBC-2.2.14.orig/odbcinstQ/CStatSummary.cpp 2008-06-30 09:20:44.000000000 -0400
+++ unixODBC-2.2.14/odbcinstQ/CStatSummary.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -95,22 +95,22 @@
if ( aStats[3].value.l_value > nSliderMax )
nSliderMax = aStats[3].value.l_value;
- qs.sprintf( "%d", aStats[0].value.l_value );
+ qs.sprintf( "%ld", aStats[0].value.l_value );
pEnv->setText( qs );
pEnvSlider->setMinValue( 0-nSliderMax );
pEnvSlider->setValue( 0-aStats[0].value.l_value );
- qs.sprintf( "%d", aStats[1].value.l_value );
+ qs.sprintf( "%ld", aStats[1].value.l_value );
pCon->setText( qs );
pConSlider->setMinValue( 0-nSliderMax );
pConSlider->setValue( 0-aStats[1].value.l_value );
- qs.sprintf( "%d", aStats[2].value.l_value );
+ qs.sprintf( "%ld", aStats[2].value.l_value );
pSta->setText( qs );
pStaSlider->setMinValue( 0-nSliderMax );
pStaSlider->setValue( 0-aStats[2].value.l_value );
- qs.sprintf( "%d", aStats[3].value.l_value );
+ qs.sprintf( "%ld", aStats[3].value.l_value );
pDes->setText( qs );
pDesSlider->setMinValue( 0-nSliderMax );
pDesSlider->setValue( 0-aStats[3].value.l_value );
diff -Naur unixODBC-2.2.14.orig/odbctest/attr.cpp unixODBC-2.2.14/odbctest/attr.cpp
--- unixODBC-2.2.14.orig/odbctest/attr.cpp 2007-11-29 07:00:37.000000000 -0500
+++ unixODBC-2.2.14/odbctest/attr.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -1314,47 +1314,47 @@
{
case SQL_ATTR_FETCH_BOOKMARK_PTR:
vptr = hand-> bookmark_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
case SQL_ATTR_PARAM_BIND_OFFSET_PTR:
vptr = hand-> param_bind_offset_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
case SQL_ATTR_PARAM_OPERATION_PTR:
vptr = hand-> param_opt_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
case SQL_ATTR_PARAM_STATUS_PTR:
vptr = hand-> param_status_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
case SQL_ATTR_PARAMS_PROCESSED_PTR:
vptr = hand-> params_processed_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
case SQL_ATTR_ROW_BIND_OFFSET_PTR:
vptr = hand-> row_bind_offset_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
case SQL_ATTR_ROW_OPERATION_PTR:
vptr = hand-> row_operation_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
case SQL_ATTR_ROW_STATUS_PTR:
vptr = hand-> row_status_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
case SQL_ATTR_ROWS_FETCHED_PTR:
vptr = hand-> rows_fetched_ptr;
- txt.sprintf( " Value: %x", vptr );
+ txt.sprintf( " Value: %p", vptr );
break;
}
}
@@ -1735,7 +1735,7 @@
{
void *ival;
memcpy( &ival, buf, sizeof( ival ));
- txt.sprintf( " ValuePtr = 0x%08X", ival );
+ txt.sprintf( " ValuePtr = 0x%08lX", (long) ival );
odbctest -> out_win -> insertLineLimited( txt );
}
else
diff -Naur unixODBC-2.2.14.orig/odbctest/desc.cpp unixODBC-2.2.14/odbctest/desc.cpp
--- unixODBC-2.2.14.orig/odbctest/desc.cpp 2007-02-12 06:49:37.000000000 -0500
+++ unixODBC-2.2.14/odbctest/desc.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -382,7 +382,7 @@
{
if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_CHAR )
{
- txt.sprintf( " ValuePtr: %s", buf );
+ txt.sprintf( " ValuePtr: %s", (char *) buf );
}
else if ( field_ident_struct[ diag_info -> currentItem() ].data_type == SQL_IS_POINTER )
{
@@ -775,7 +775,7 @@
}
else
{
- txt.sprintf( " *LengthPtr: %d", length_val );
+ txt.sprintf( " *LengthPtr: %ld", (long) length_val );
}
odbctest -> out_win -> insertLineLimited( txt );
}
diff -Naur unixODBC-2.2.14.orig/odbctest/env.cpp unixODBC-2.2.14/odbctest/env.cpp
--- unixODBC-2.2.14.orig/odbctest/env.cpp 2007-02-12 06:49:37.000000000 -0500
+++ unixODBC-2.2.14/odbctest/env.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -470,7 +470,7 @@
server_name = new SQLCHAR[ bl1 ];
- txt.sprintf( " ServerName: %p", bl1 );
+ txt.sprintf( " ServerName: %p", server_name );
}
odbctest -> out_win -> insertLineLimited( txt );
@@ -500,7 +500,7 @@
description = new SQLCHAR[ bl1 ];
- txt.sprintf( " Description: %p", bl1 );
+ txt.sprintf( " Description: %p", description );
}
odbctest -> out_win -> insertLineLimited( txt );
@@ -728,7 +728,7 @@
server_name = new SQLCHAR[ bl1 ];
- txt.sprintf( " ServerName: %p", bl1 );
+ txt.sprintf( " ServerName: %p", server_name );
}
odbctest -> out_win -> insertLineLimited( txt );
@@ -758,7 +758,7 @@
description = new SQLCHAR[ bl1 ];
- txt.sprintf( " Description: %p", bl1 );
+ txt.sprintf( " Description: %p", description );
}
odbctest -> out_win -> insertLineLimited( txt );
diff -Naur unixODBC-2.2.14.orig/odbctest/odbctest.h unixODBC-2.2.14/odbctest/odbctest.h
--- unixODBC-2.2.14.orig/odbctest/odbctest.h 2007-02-12 06:49:37.000000000 -0500
+++ unixODBC-2.2.14/odbctest/odbctest.h 2009-02-15 18:34:44.000000000 -0500
@@ -103,7 +103,7 @@
SQLUINTEGER *row_bind_offset_ptr, row_bind_offset;
SQLUSMALLINT *row_operation_ptr, row_operation;
SQLUSMALLINT *row_status_ptr, row_status;
- SQLUINTEGER *rows_fetched_ptr, rows_fetched;
+ SQLULEN *rows_fetched_ptr, rows_fetched;
private:
int type;
diff -Naur unixODBC-2.2.14.orig/odbctest/results.cpp unixODBC-2.2.14/odbctest/results.cpp
--- unixODBC-2.2.14.orig/odbctest/results.cpp 2007-04-17 11:16:17.000000000 -0400
+++ unixODBC-2.2.14/odbctest/results.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -815,7 +815,7 @@
}
else
{
- txt.sprintf( " *Strlen_or_Ind Ptr: %d", strlen_or_ind );
+ txt.sprintf( " *Strlen_or_Ind Ptr: %ld", (long) strlen_or_ind );
}
odbctest -> out_win -> insertLineLimited( txt );
}
@@ -945,7 +945,7 @@
long val;
memcpy( &val, buf, sizeof( val ));
- txt.sprintf( " *Target Value Ptr: %d (0x%x)", val, val );
+ txt.sprintf( " *Target Value Ptr: %ld (0x%lx)", val, val );
break;
}
@@ -964,7 +964,7 @@
long val;
memcpy( &val, buf, sizeof( val ));
- txt.sprintf( " *Target Value Ptr: %d (0x%x)", val, val );
+ txt.sprintf( " *Target Value Ptr: %ld (0x%lx)", val, val );
break;
}
@@ -1433,7 +1433,7 @@
}
else
{
- txt.sprintf( " *Column Size Ptr: %d", column_size );
+ txt.sprintf( " *Column Size Ptr: %ld", (long) column_size );
}
odbctest -> out_win -> insertLineLimited( txt );
}
@@ -1596,7 +1596,7 @@
}
else
{
- txt.sprintf( " *RowCountPtr: %d", num_rows );
+ txt.sprintf( " *RowCountPtr: %ld", (long) num_rows );
}
odbctest -> out_win -> insertLineLimited( txt );
@@ -2047,7 +2047,7 @@
if ( buf )
{
- txt.sprintf( " *CharacterAttributePtr: %s", buf );
+ txt.sprintf( " *CharacterAttributePtr: %s", (char *) buf );
odbctest -> out_win -> insertLineLimited( txt );
}
}
@@ -2055,7 +2055,7 @@
{
if ( numeric_ptr )
{
- txt.sprintf( " *NumericAttributePtr: %d", numeric_value );
+ txt.sprintf( " *NumericAttributePtr: %ld", (long) numeric_value );
odbctest -> out_win -> insertLineLimited( txt );
}
}
@@ -2311,7 +2311,7 @@
if ( buf )
{
- txt.sprintf( " *rgbDesc: %s", buf );
+ txt.sprintf( " *rgbDesc: %s", (char *) buf );
odbctest -> out_win -> insertLineLimited( txt );
}
}
@@ -2319,7 +2319,7 @@
{
if ( numeric_ptr )
{
- txt.sprintf( " *pfDesc: %d", numeric_value );
+ txt.sprintf( " *pfDesc: %ld", (long) numeric_value );
odbctest -> out_win -> insertLineLimited( txt );
}
}
@@ -2554,7 +2554,7 @@
SQLHANDLE in_handle = SQL_NULL_HANDLE;
SQLSMALLINT fetch_orentation;
SQLINTEGER fetch_offset;
- SQLUINTEGER row_count, *row_count_ptr;
+ SQLULEN row_count, *row_count_ptr;
SQLUSMALLINT *row_status_array;
int index;
@@ -2616,7 +2616,7 @@
odbctest -> out_win -> insertLineLimited( " Out:" );
if ( row_count_ptr )
{
- txt.sprintf( " *RowCountPtr: %d", row_count);
+ txt.sprintf( " *RowCountPtr: %ld", (long) row_count);
odbctest -> out_win -> insertLineLimited( txt );
}
if ( row_status_array )
diff -Naur unixODBC-2.2.14.orig/odbctest/stmt.cpp unixODBC-2.2.14/odbctest/stmt.cpp
--- unixODBC-2.2.14.orig/odbctest/stmt.cpp 2007-02-13 01:14:21.000000000 -0500
+++ unixODBC-2.2.14/odbctest/stmt.cpp 2009-02-15 18:34:44.000000000 -0500
@@ -1307,7 +1307,7 @@
else
{
decimal_digits_ptr = &decimal_digits;
- txt.sprintf( " DecimalDigitsPtr: %p", decimal_digits );
+ txt.sprintf( " DecimalDigitsPtr: %p", decimal_digits_ptr );
}
odbctest -> out_win -> insertLineLimited( txt );
decimal_digits = -9999;
@@ -1366,7 +1366,7 @@
}
else
{
- txt.sprintf( " *ParamSizePtr: %d", param_size );
+ txt.sprintf( " *ParamSizePtr: %ld", (long) param_size );
}
odbctest -> out_win -> insertLineLimited( txt );
}
@@ -1518,7 +1518,7 @@
{
if ( value_ptr )
{
- txt.sprintf( " *ValuePtr: %d", value );
+ txt.sprintf( " *ValuePtr: %ld", (long) value );
odbctest -> out_win -> insertLineLimited( txt );
}
}
@@ -1712,13 +1712,13 @@
data_ptr_var = NULL;
else
data_ptr_var = (SQLPOINTER) s->latin1();
- txt.sprintf( " DataPtr: %s", data_ptr_var );
+ txt.sprintf( " DataPtr: %p", data_ptr_var );
odbctest -> out_win -> insertLineLimited( txt );
}
else
{
data_ptr_var = ( SQLPOINTER ) data_str;
- txt.sprintf( " DataPtr: %s", data_ptr_var );
+ txt.sprintf( " DataPtr: %s", (char *) data_ptr_var );
odbctest -> out_win -> insertLineLimited( txt );
}
diff -Naur unixODBC-2.2.14.orig/samples/helper.c unixODBC-2.2.14/samples/helper.c
--- unixODBC-2.2.14.orig/samples/helper.c 2001-12-13 08:00:34.000000000 -0500
+++ unixODBC-2.2.14/samples/helper.c 2009-02-15 18:34:43.000000000 -0500
@@ -96,7 +96,7 @@
{
sprintf(qbuf, "create table \"%s\" "
"(a INTEGER PRIMARY KEY, b %s(%ld))",
- table_name, type, length);
+ table_name, type, (long) length);
}
else
{
@@ -728,7 +728,7 @@
if (SQL_SUCCEEDED(ret))
{
sprintf(cbuf, "** error: %s:%d:%ld:%s **\n",
- state, i, native, text);
+ state, i, (long) native, text);
szLogPrintf( srv_info, FALSE, cbuf);
}
}