Changeset: b6d5d90a549e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b6d5d90a549e
Modified Files:
        clients/odbc/driver/SQLGetInfo.c
Branch: Jul2017
Log Message:

On 32-bit architectures, SQLULEN and SQLUINTEGER are the same.
We need this because of the new -Wduplicated-branches compiler flag.


diffs (21 lines):

diff --git a/clients/odbc/driver/SQLGetInfo.c b/clients/odbc/driver/SQLGetInfo.c
--- a/clients/odbc/driver/SQLGetInfo.c
+++ b/clients/odbc/driver/SQLGetInfo.c
@@ -1145,10 +1145,14 @@ MNDBGetInfo(ODBCDbc *dbc,
        if (sValue) {
                copyString(sValue, strlen(sValue), InfoValuePtr, BufferLength, 
StringLengthPtr, SQLSMALLINT, addDbcError, dbc, return SQL_ERROR);
        } else if (InfoValuePtr) {
-               if (len == sizeof(SQLULEN))
+               if (len == sizeof(SQLUINTEGER))
+                       *(SQLUINTEGER *) InfoValuePtr = (SQLUINTEGER) nValue;
+#ifndef SQLULEN
+               /* if SQLULEN is defined, it's defined as SQLUINTEGER
+                * which we've handled */
+               else if (len == sizeof(SQLULEN))
                        *(SQLULEN *) InfoValuePtr = (SQLULEN) nValue;
-               else if (len == sizeof(SQLUINTEGER))
-                       *(SQLUINTEGER *) InfoValuePtr = (SQLUINTEGER) nValue;
+#endif
                else if (len == sizeof(SQLUSMALLINT))
                        *(SQLUSMALLINT *) InfoValuePtr = (SQLUSMALLINT) nValue;
                if (StringLengthPtr)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to