diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-01-21 22:04:33 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-01-26 13:20:38 (GMT) |
commit | b7de076b698a1e0a61c6b1597db860c88dd3ee86 (patch) | |
tree | dfb6374f0b65c93e86c22f5a76a0475455777c08 /src/sql | |
parent | 7012b6697df8472df5d772394edb0fbf7219da42 (diff) | |
download | Qt-b7de076b698a1e0a61c6b1597db860c88dd3ee86.zip Qt-b7de076b698a1e0a61c6b1597db860c88dd3ee86.tar.gz Qt-b7de076b698a1e0a61c6b1597db860c88dd3ee86.tar.bz2 |
Fix warning in ODBC driver: passing NULL to non-pointer.
Warning was:
passing NULL to non-pointer argument 7 of 'SQLRETURN SQLGetDiagRecW(SQLSMALLINT, void*, SQLSMALLINT, SQLWCHAR*, SQLINTEGER*, SQLWCHAR*, SQLSMALLINT, SQLSMALLINT*)'
Diffstat (limited to 'src/sql')
-rw-r--r-- | src/sql/drivers/odbc/qsql_odbc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp index c91aa54..8cff61b 100644 --- a/src/sql/drivers/odbc/qsql_odbc.cpp +++ b/src/sql/drivers/odbc/qsql_odbc.cpp @@ -223,7 +223,7 @@ static QString qWarnODBCHandle(int handleType, SQLHANDLE handle, int *nativeCode state_, &nativeCode_, 0, - NULL, + 0, &msgLen); if ((r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) && msgLen > 0) description_.resize(msgLen+1); @@ -400,7 +400,7 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni // colSize-1: remove 0 termination when there is more data to fetch int rSize = (r == SQL_SUCCESS_WITH_INFO) ? colSize : lengthIndicator/sizeof(SQLTCHAR); fieldVal += fromSQLTCHAR(buf, rSize); - if (lengthIndicator < (unsigned int)colSize*sizeof(SQLTCHAR)) { + if ((unsigned)lengthIndicator < colSize*sizeof(SQLTCHAR)) { // workaround for Drivermanagers that don't return SQL_NO_DATA break; } |