summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx2
-rw-r--r--connectivity/source/sdbcx/VCollection.cxx2
2 files changed, 4 insertions, 0 deletions
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 34ed9b8f0152..f1450a6cc762 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -181,8 +181,10 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const OUString& colum
}
::dbtools::throwInvalidColumnException( columnName, *this );
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
assert(false);
return 0; // Never reached
+#endif
}
void ODatabaseMetaDataResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException)
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index a6000c5bc492..f2be688a0963 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -432,7 +432,9 @@ sal_Int32 SAL_CALL OCollection::findColumn( const OUString& columnName ) throw(S
if ( !m_pElements->exists(columnName) )
{
::dbtools::throwInvalidColumnException( columnName, static_cast< XIndexAccess*>(this) );
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
assert(false);
+#endif
}
return m_pElements->findColumn(columnName) + 1; // because columns start at one