coverity#735354 SQL_ODBC_SQL_CONFORMANCE "same on both sides"
Caolán McNamara
caolanm at redhat.com
Wed May 14 13:09:10 PDT 2014
connectivity/source/drivers/odbc/ODatabaseMetaData.cxx:1502 is..
1501 ... SQL_ODBC_SQL_CONFORMANCE ...
1502 ... SQL_OSC_CORE || ... SQL_OAC_LEVEL1 || ... SQL_OAC_LEVEL2 ...
and coverity complains that SQL_OAC_LEVEL1 and SQL_OSC_CORE are both 1.
Looking at external/unixODBC/inc/odbc/sqlext.h I see that...
/* SQL_ODBC_SQL_CONFORMANCE values */
#define SQL_OSC_MINIMUM 0x0000
#define SQL_OSC_CORE 0x0001
#define SQL_OSC_EXTENDED 0x0002
while...
/* SQL_ODBC_API_CONFORMANCE values */
#define SQL_OAC_NONE 0x0000
#define SQL_OAC_LEVEL1 0x0001
#define SQL_OAC_LEVEL2 0x0002
i.e. we're randomly comparing a SQL_ODBC_API_CONFORMANCE value
against a result from SQL_ODBC_SQL_CONFORMANCE
so it looks like it should either be...
SQL_OSC_MINIMUM || SQL_OSC_CORE || SQL_OSC_EXTENDED
which would be a change in logic, but perhaps the intent, or
SQL_OSC_CORE || SQL_OSC_EXTENDED
which would keep the status quo (which is 13 years since
26f4169ad38df90493149e8c0b2270eb8e47d541).
Any thoughts on which is preferable?
C.
More information about the LibreOffice
mailing list