Skip to content
Permalink
Browse files Browse the repository at this point in the history
New Pre Source
  • Loading branch information
Nick Gorham committed Jan 8, 2018
1 parent fce0b99 commit 45ef78e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
2.3.6pre

* Fix order of arguments in SQLWriteFileDSN.c, fix unwanted free() in iusql.c

2-Jan-2018
2.3.5

Expand Down
2 changes: 2 additions & 0 deletions DriverManager/SQLGetDiagRecW.c
Expand Up @@ -98,6 +98,8 @@

static char const rcsid[]= "$RCSfile: SQLGetDiagRecW.c,v $";

extern int __is_env( EHEAD * head ); /* in SQLGetDiagRec.c */

static SQLRETURN extract_sql_error_rec_w( EHEAD *head,
SQLWCHAR *sqlstate,
SQLINTEGER rec_number,
Expand Down
8 changes: 4 additions & 4 deletions DriverManager/SQLSetDescField.c
Expand Up @@ -306,7 +306,7 @@ SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle,
return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
}

if ( field_identifier == SQL_DESC_COUNT && (SQLINTEGER)value < 0 )
if ( field_identifier == SQL_DESC_COUNT && (intptr_t)value < 0 )
{
__post_internal_error( &descriptor -> error,
ERROR_07009, NULL,
Expand All @@ -315,9 +315,9 @@ SQLRETURN SQLSetDescField( SQLHDESC descriptor_handle,
return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
}

if ( field_identifier == SQL_DESC_PARAMETER_TYPE && value != SQL_PARAM_INPUT
&& value != SQL_PARAM_OUTPUT && value != SQL_PARAM_INPUT_OUTPUT &&
value != SQL_PARAM_INPUT_OUTPUT_STREAM && value != SQL_PARAM_OUTPUT_STREAM )
if ( field_identifier == SQL_DESC_PARAMETER_TYPE && (intptr_t)value != SQL_PARAM_INPUT
&& (intptr_t)value != SQL_PARAM_OUTPUT && (intptr_t)value != SQL_PARAM_INPUT_OUTPUT &&
(intptr_t)value != SQL_PARAM_INPUT_OUTPUT_STREAM && (intptr_t)value != SQL_PARAM_OUTPUT_STREAM )
{
__post_internal_error( &descriptor -> error,
ERROR_HY105, NULL,
Expand Down
8 changes: 4 additions & 4 deletions DriverManager/SQLSetDescFieldW.c
Expand Up @@ -288,7 +288,7 @@ SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle,
return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
}

if ( field_identifier == SQL_DESC_COUNT && (SQLINTEGER)value < 0 )
if ( field_identifier == SQL_DESC_COUNT && (intptr_t)value < 0 )
{
__post_internal_error( &descriptor -> error,
ERROR_07009, NULL,
Expand All @@ -297,9 +297,9 @@ SQLRETURN SQLSetDescFieldW( SQLHDESC descriptor_handle,
return function_return_nodrv( SQL_HANDLE_DESC, descriptor, SQL_ERROR );
}

if ( field_identifier == SQL_DESC_PARAMETER_TYPE && value != SQL_PARAM_INPUT
&& value != SQL_PARAM_OUTPUT && value != SQL_PARAM_INPUT_OUTPUT &&
value != SQL_PARAM_INPUT_OUTPUT_STREAM && value != SQL_PARAM_OUTPUT_STREAM )
if ( field_identifier == SQL_DESC_PARAMETER_TYPE && (intptr_t)value != SQL_PARAM_INPUT
&& (intptr_t)value != SQL_PARAM_OUTPUT && (intptr_t)value != SQL_PARAM_INPUT_OUTPUT &&
(intptr_t)value != SQL_PARAM_INPUT_OUTPUT_STREAM && (intptr_t)value != SQL_PARAM_OUTPUT_STREAM )
{
__post_internal_error( &descriptor -> error,
ERROR_HY105, NULL,
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.

AC_INIT([unixODBC], [2.3.5], nick@unixodbc.org, [unixODBC])
AC_INIT([unixODBC], [2.3.6pre], nick@unixodbc.org, [unixODBC])
AM_INIT_AUTOMAKE

dnl Checks for programs.
Expand Down
1 change: 0 additions & 1 deletion exe/iusql.c
Expand Up @@ -413,7 +413,6 @@ static int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNa
if ( bVerbose ) DumpODBCLog( hEnv, hDbc, hStmt );
fprintf( stderr, "[ISQL]ERROR: Could not SQLExecDirect\n" );
SQLFreeStmt( hStmt, SQL_DROP );
free(szSepLine);
return 0;
}
}
Expand Down
8 changes: 4 additions & 4 deletions odbcinst/SQLCreateDataSource.c
Expand Up @@ -26,7 +26,7 @@ char* _multi_string_alloc_and_copy( LPCWSTR in )

if ( !in )
{
return in;
return NULL;
}

while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
Expand Down Expand Up @@ -55,7 +55,7 @@ char* _single_string_alloc_and_copy( LPCWSTR in )

if ( !in )
{
return in;
return NULL;
}

while ( in[ len ] != 0 )
Expand Down Expand Up @@ -83,7 +83,7 @@ SQLWCHAR* _multi_string_alloc_and_expand( LPCSTR in )

if ( !in )
{
return in;
return NULL;
}

while ( in[ len ] != 0 || in[ len + 1 ] != 0 )
Expand Down Expand Up @@ -112,7 +112,7 @@ SQLWCHAR* _single_string_alloc_and_expand( LPCSTR in )

if ( !in )
{
return in;
return NULL;
}

while ( in[ len ] != 0 )
Expand Down
2 changes: 1 addition & 1 deletion odbcinst/SQLWriteFileDSN.c
Expand Up @@ -21,7 +21,7 @@ BOOL SQLWriteFileDSN( LPCSTR pszFileName,

if ( pszFileName[0] == '/' )
{
strncpy( szFileName, sizeof(szFileName) - 5, pszFileName );
strncpy( szFileName, pszFileName, sizeof(szFileName) - 5 );
}
else
{
Expand Down

0 comments on commit 45ef78e

Please sign in to comment.