summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx6
-rw-r--r--connectivity/source/sdbcx/VCollection.cxx5
-rw-r--r--solenv/gbuild/gbuild.mk1
-rw-r--r--ucbhelper/source/client/content.cxx7
4 files changed, 6 insertions, 13 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
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 64ca8184e2fa..999f5f79fa37 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -251,7 +251,6 @@ endif
gb_GLOBALDEFS += \
$(call gb_Helper_define_if_set,\
DISABLE_DYNLOADING \
- ENABLE_LTO \
)
gb_GLOBALDEFS := $(sort $(gb_GLOBALDEFS))
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 8d01366d3ffc..887658755be8 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -21,6 +21,7 @@
#include <cassert>
+#include <o3tl/unreachable.hxx>
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <sal/log.hxx>
@@ -1013,11 +1014,7 @@ bool Content::isFolder()
get() ) ),
m_xImpl->getEnvironment() );
-#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
- // Unreachable - cancelCommandExecution always throws an exception.
- // But some compilers complain...
- return false;
-#endif
+ O3TL_UNREACHABLE;
}