summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-08-20 21:26:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-08-20 22:27:48 +0200
commit7281c497dec340efbcef330d88b55bcabefb8147 (patch)
treefda7d8e4d673f2ba8d79ba9711cdbff5b87a831a /connectivity
parent4d9b72d1c3929eca04c7a2e363ab6214676b0f64 (diff)
Use OSL_UNREACHABLE
...in those places that used some code conditional on ENABLE_LTO to work around (non-)unreachability wranings. This removes all uses of the ENABLE_LTO C/C++ macro, so it can go completely. Change-Id: I67544986cb2d3fcd8051caf87c5129bd1086408c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101087 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx6
-rw-r--r--connectivity/source/sdbcx/VCollection.cxx5
2 files changed, 4 insertions, 7 deletions
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 969a1f1e1f4f..ffc0feb75a8b 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -29,6 +29,7 @@
#include <cppuhelper/implementationentry.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <connectivity/dbexception.hxx>
+#include <o3tl/unreachable.hxx>
#include <TConnection.hxx>
using namespace connectivity;
@@ -169,10 +170,7 @@ 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
+ O3TL_UNREACHABLE;
}
void ODatabaseMetaDataResultSet::checkIndex(sal_Int32 columnIndex )
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index d7a716a59839..860ead949074 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -30,6 +30,7 @@
#include <comphelper/property.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
+#include <o3tl/unreachable.hxx>
#include <TConnection.hxx>
#include <strings.hrc>
#include <resource/sharedresources.hxx>
@@ -434,9 +435,7 @@ sal_Int32 SAL_CALL OCollection::findColumn( const OUString& columnName )
if ( !m_pElements->exists(columnName) )
{
::dbtools::throwInvalidColumnException( columnName, static_cast< XIndexAccess*>(this) );
-#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
- assert(false);
-#endif
+ O3TL_UNREACHABLE;
}
return m_pElements->findColumn(columnName) + 1; // because columns start at one