connectivity/source/commontools/BlobHelper.cxx                  |    2 
 connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx  |   17 -------
 connectivity/source/drivers/ado/ACallableStatement.cxx          |   19 --------
 connectivity/source/drivers/ado/ADatabaseMetaData.cxx           |    2 
 connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx  |   18 --------
 connectivity/source/drivers/ado/AResultSet.cxx                  |   13 -----
 connectivity/source/drivers/calc/CConnection.cxx                |    2 
 connectivity/source/drivers/component/CResultSet.cxx            |    1 
 connectivity/source/drivers/dbase/DConnection.cxx               |    2 
 connectivity/source/drivers/dbase/DDriver.cxx                   |    1 
 connectivity/source/drivers/dbase/DResultSet.cxx                |    1 
 connectivity/source/drivers/file/FConnection.cxx                |    1 
 connectivity/source/drivers/file/FDriver.cxx                    |    1 
 connectivity/source/drivers/file/FResultSet.cxx                 |    2 
 connectivity/source/drivers/firebird/Blob.cxx                   |    2 
 connectivity/source/drivers/firebird/Clob.cxx                   |    2 
 connectivity/source/drivers/firebird/Connection.cxx             |    2 
 connectivity/source/drivers/firebird/ResultSet.cxx              |   10 ----
 connectivity/source/drivers/flat/EConnection.cxx                |    1 
 connectivity/source/drivers/flat/EDriver.cxx                    |    1 
 connectivity/source/drivers/jdbc/Blob.cxx                       |    1 
 connectivity/source/drivers/jdbc/Clob.cxx                       |    7 ---
 connectivity/source/drivers/jdbc/JDriver.cxx                    |    1 
 connectivity/source/drivers/macab/MacabResultSet.cxx            |    6 --
 connectivity/source/drivers/odbc/OConnection.cxx                |    1 
 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx |   10 ----
 connectivity/source/drivers/odbc/ODriver.cxx                    |    1 
 connectivity/source/drivers/odbc/OPreparedStatement.cxx         |    4 -
 connectivity/source/drivers/odbc/OResultSet.cxx                 |   22 
----------
 connectivity/source/drivers/postgresql/pq_resultset.cxx         |    1 
 connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx |    2 
 connectivity/source/drivers/writer/WConnection.cxx              |    1 
 connectivity/source/sdbcx/VCollection.cxx                       |    3 -
 connectivity/source/sdbcx/VUser.cxx                             |    2 
 dbaccess/source/core/api/RowSetBase.cxx                         |    2 
 dbaccess/source/ui/browser/formadapter.cxx                      |    2 
 include/connectivity/dbexception.hxx                            |   22 
+++++-----
 37 files changed, 18 insertions(+), 170 deletions(-)

New commits:
commit e756c168c28b54a825bdc7481b47be9a89f7e77e
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri May 3 08:41:17 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun May 5 20:03:10 2024 +0200

    use [[noreturn]] for these throw helpers
    
    Change-Id: Ia50d6f2be91e830201689cc428e55203eeb41eb0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167035
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/connectivity/source/commontools/BlobHelper.cxx 
b/connectivity/source/commontools/BlobHelper.cxx
index f1f048a7318e..6f4808d96626 100644
--- a/connectivity/source/commontools/BlobHelper.cxx
+++ b/connectivity/source/commontools/BlobHelper.cxx
@@ -51,13 +51,11 @@ css::uno::Reference< css::io::XInputStream > SAL_CALL 
BlobHelper::getBinaryStrea
 ::sal_Int64 SAL_CALL BlobHelper::position( const css::uno::Sequence< 
::sal_Int8 >& /*pattern*/, ::sal_Int64 /*start*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XBlob::position", 
*this );
-    O3TL_UNREACHABLE;
 }
 
 ::sal_Int64 SAL_CALL BlobHelper::positionOfBlob( const css::uno::Reference< 
css::sdbc::XBlob >& /*pattern*/, ::sal_Int64 /*start*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XBlob::positionOfBlob", *this );
-    O3TL_UNREACHABLE;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx 
b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 6b80f9495fe4..e42a9336817a 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -162,7 +162,6 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( 
const OUString& colum
     }
 
     ::dbtools::throwInvalidColumnException( columnName, *this );
-    O3TL_UNREACHABLE;
 }
 
 void ODatabaseMetaDataResultSet::checkIndex(std::unique_lock<std::mutex>& 
/*rGuard*/, sal_Int32 columnIndex )
@@ -318,16 +317,13 @@ bool ODatabaseMetaDataResultSet::isAfterLast( 
std::unique_lock<std::mutex>& /*rG
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
-
 void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
@@ -348,64 +344,51 @@ void SAL_CALL ODatabaseMetaDataResultSet::close(  )
     dispose();
 }
 
-
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
-
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 /*row*/ )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 /*row*/ )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
-
 Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement(  )
 {
     return m_aStatement.get();
 }
 
-
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated(  )
 {
     ::dbtools::throwFunctionSequenceException(*this);
-    O3TL_UNREACHABLE;
 }
 
-
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst()
 {
     return m_bBOF;
diff --git a/connectivity/source/drivers/ado/ACallableStatement.cxx 
b/connectivity/source/drivers/ado/ACallableStatement.cxx
index 94ad744d0134..fae8b0f5394e 100644
--- a/connectivity/source/drivers/ado/ACallableStatement.cxx
+++ b/connectivity/source/drivers/ado/ACallableStatement.cxx
@@ -117,7 +117,6 @@ sal_Int32 SAL_CALL OCallableStatement::getInt( sal_Int32 
columnIndex )
     return m_aValue.getInt32();
 }
 
-
 sal_Int64 SAL_CALL OCallableStatement::getLong( sal_Int32 columnIndex )
 {
     ADOParameter* pParam = nullptr;
@@ -127,14 +126,11 @@ sal_Int64 SAL_CALL OCallableStatement::getLong( sal_Int32 
columnIndex )
     return static_cast<sal_Int64>(m_aValue.getCurrency().int64);
 }
 
-
 Any SAL_CALL OCallableStatement::getObject( sal_Int32 /*columnIndex*/, const 
Reference< css::container::XNameAccess >& /*typeMap*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getObject", 
*this );
-    return Any();
 }
 
-
 sal_Int16 SAL_CALL OCallableStatement::getShort( sal_Int32 columnIndex )
 {
     ADOParameter* pParam = nullptr;
@@ -144,7 +140,6 @@ sal_Int16 SAL_CALL OCallableStatement::getShort( sal_Int32 
columnIndex )
     return m_aValue.getInt16();
 }
 
-
 OUString SAL_CALL OCallableStatement::getString( sal_Int32 columnIndex )
 {
     ADOParameter* pParam = nullptr;
@@ -154,8 +149,7 @@ OUString SAL_CALL OCallableStatement::getString( sal_Int32 
columnIndex )
     return m_aValue.getString();
 }
 
-
- css::util::Time SAL_CALL OCallableStatement::getTime( sal_Int32 columnIndex )
+css::util::Time SAL_CALL OCallableStatement::getTime( sal_Int32 columnIndex )
 {
     ADOParameter* pParam = nullptr;
     m_pParameters->get_Item(OLEVariant(sal_Int32(columnIndex-1)),&pParam);
@@ -202,43 +196,33 @@ void SAL_CALL 
OCallableStatement::registerNumericOutParameter( sal_Int32 paramet
 Reference< css::io::XInputStream > SAL_CALL 
OCallableStatement::getBinaryStream( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XRow::getBinaryStream", *this );
-    return nullptr;
 }
 
 Reference< css::io::XInputStream > SAL_CALL 
OCallableStatement::getCharacterStream( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XRow::getCharacterStream", *this );
-    return nullptr;
 }
 
-
 Reference< XArray > SAL_CALL OCallableStatement::getArray( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getArray", *this 
);
-    return nullptr;
 }
 
-
 Reference< XClob > SAL_CALL OCallableStatement::getClob( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getClob", *this 
);
-    return nullptr;
 }
 
 Reference< XBlob > SAL_CALL OCallableStatement::getBlob( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getBlob", *this 
);
-    return nullptr;
 }
 
-
 Reference< XRef > SAL_CALL OCallableStatement::getRef( sal_Int32 
/*columnIndex*/)
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRef", *this );
-    return nullptr;
 }
 
-
 void SAL_CALL OCallableStatement::acquire() noexcept
 {
     OPreparedStatement::acquire();
@@ -249,5 +233,4 @@ void SAL_CALL OCallableStatement::release() noexcept
     OPreparedStatement::release();
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx 
b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx
index 65e0a80f52a8..fc4244e4965b 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx
@@ -1027,8 +1027,6 @@ sal_Bool SAL_CALL 
ODatabaseMetaData::supportsBatchUpdates(  )
 Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& 
/*catalog*/, const OUString& /*schemaPattern*/, const OUString& 
/*typeNamePattern*/, const Sequence< sal_Int32 >& /*types*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XDatabaseMetaData::getUDTs", *this );
-    return Reference< XResultSet >();
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx 
b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
index bb5bda634cfc..0e5c082d7fdf 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
@@ -112,7 +112,6 @@ void ODatabaseMetaDataResultSet::checkRecordSet()
         throwFunctionSequenceException(*this);
 }
 
-
 sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const OUString& 
columnName )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
@@ -130,9 +129,8 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( 
const OUString& colum
     }
 
     ::dbtools::throwInvalidColumnException( columnName, *this );
-    assert(false);
-    return 0; // Never reached
 }
+
 #define BLOCK_SIZE 256
 
 Reference< css::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 columnIndex )
@@ -181,10 +179,8 @@ Reference< css::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getBinar
 Reference< css::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XRow::getCharacterStream", *this );
-    return nullptr;
 }
 
-
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 
columnIndex )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
@@ -261,21 +257,16 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getInt( 
sal_Int32 columnIndex )
     return m_aValue.getInt32();
 }
 
-
 sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getRow(  )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XResultSet::getRow", 
*this );
-    return 0;
 }
 
-
 sal_Int64 SAL_CALL ODatabaseMetaDataResultSet::getLong( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getLong", *this 
);
-    return sal_Int64(0);
 }
 
-
 Reference< XResultSetMetaData > SAL_CALL 
ODatabaseMetaDataResultSet::getMetaData(  )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
@@ -293,30 +284,23 @@ Reference< XResultSetMetaData > SAL_CALL 
ODatabaseMetaDataResultSet::getMetaData
 Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRow", *this );
-    return nullptr;
 }
 
-
 Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRow", *this );
-    return nullptr;
 }
 
 Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRow", *this );
-    return nullptr;
 }
 
-
 Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRow", *this );
-    return nullptr;
 }
 
-
 Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 columnIndex, 
const Reference< css::container::XNameAccess >& /*typeMap*/ )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
diff --git a/connectivity/source/drivers/ado/AResultSet.cxx 
b/connectivity/source/drivers/ado/AResultSet.cxx
index 7e633130d95e..3e7c143d839a 100644
--- a/connectivity/source/drivers/ado/AResultSet.cxx
+++ b/connectivity/source/drivers/ado/AResultSet.cxx
@@ -139,7 +139,6 @@ css::uno::Sequence< css::uno::Type > SAL_CALL 
OResultSet::getTypes(  )
     return 
::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes());
 }
 
-
 sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& columnName )
 {
     ::osl::MutexGuard aGuard( m_aMutex );
@@ -157,9 +156,8 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& 
columnName )
     }
 
     ::dbtools::throwInvalidColumnException( columnName, *this );
-    assert(false);
-    return 0; // Never reached
 }
+
 #define BLOCK_SIZE 256
 
 Reference< css::io::XInputStream > SAL_CALL OResultSet::getBinaryStream( 
sal_Int32 columnIndex )
@@ -205,7 +203,6 @@ Reference< css::io::XInputStream > SAL_CALL 
OResultSet::getBinaryStream( sal_Int
 Reference< css::io::XInputStream > SAL_CALL OResultSet::getCharacterStream( 
sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XRow::getCharacterStream", *this );
-    return nullptr;
 }
 
 OLEVariant OResultSet::getValue(sal_Int32 columnIndex )
@@ -276,7 +273,6 @@ sal_Int32 SAL_CALL OResultSet::getRow(  )
 sal_Int64 SAL_CALL OResultSet::getLong( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getLong", *this 
);
-    return sal_Int64(0);
 }
 
 
@@ -294,30 +290,23 @@ Reference< XResultSetMetaData > SAL_CALL 
OResultSet::getMetaData(  )
 Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getArray", *this 
);
-    return nullptr;
 }
 
-
 Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getClob", *this 
);
-    return nullptr;
 }
 
 Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getBlob", *this 
);
-    return nullptr;
 }
 
-
 Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRef", *this );
-    return nullptr;
 }
 
-
 Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< 
css::container::XNameAccess >& /*typeMap*/ )
 {
     return getValue(columnIndex).makeAny();
diff --git a/connectivity/source/drivers/calc/CConnection.cxx 
b/connectivity/source/drivers/calc/CConnection.cxx
index 5c746414ed96..275e75f98b38 100644
--- a/connectivity/source/drivers/calc/CConnection.cxx
+++ b/connectivity/source/drivers/calc/CConnection.cxx
@@ -254,8 +254,6 @@ Reference< XPreparedStatement > SAL_CALL 
OCalcConnection::prepareCall( const OUS
     checkDisposed(OConnection_BASE::rBHelper.bDisposed);
 
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XConnection::prepareCall", *this );
-    return nullptr;
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/component/CResultSet.cxx 
b/connectivity/source/drivers/component/CResultSet.cxx
index 08e6e04aca70..75f0711176ff 100644
--- a/connectivity/source/drivers/component/CResultSet.cxx
+++ b/connectivity/source/drivers/component/CResultSet.cxx
@@ -131,7 +131,6 @@ Sequence< sal_Int32 > SAL_CALL 
OComponentResultSet::deleteRows( const  Sequence<
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
 
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XDeleteRows::deleteRows", *this );
-    return Sequence< sal_Int32 >();
 }
 
 bool OComponentResultSet::fillIndexValues(const Reference< XColumnsSupplier> 
&/*_xIndex*/)
diff --git a/connectivity/source/drivers/dbase/DConnection.cxx 
b/connectivity/source/drivers/dbase/DConnection.cxx
index 7498f23e4bf7..7992bc10a0d5 100644
--- a/connectivity/source/drivers/dbase/DConnection.cxx
+++ b/connectivity/source/drivers/dbase/DConnection.cxx
@@ -103,8 +103,6 @@ Reference< XPreparedStatement > SAL_CALL 
ODbaseConnection::prepareStatement( con
 Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareCall( const 
OUString& /*sql*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XConnection::prepareCall", *this );
-    return nullptr;
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/dbase/DDriver.cxx 
b/connectivity/source/drivers/dbase/DDriver.cxx
index ff0ec256e18a..21414fd7fc7f 100644
--- a/connectivity/source/drivers/dbase/DDriver.cxx
+++ b/connectivity/source/drivers/dbase/DDriver.cxx
@@ -111,7 +111,6 @@ Sequence< DriverPropertyInfo > SAL_CALL 
ODriver::getPropertyInfo( const OUString
     SharedResources aResources;
     const OUString sMessage = 
aResources.getResourceString(STR_URI_SYNTAX_ERROR);
     ::dbtools::throwGenericSQLException(sMessage ,*this);
-    return Sequence< DriverPropertyInfo >();
 }
 
 
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx 
b/connectivity/source/drivers/dbase/DResultSet.cxx
index 123a29b8b069..c257747a75a3 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -150,7 +150,6 @@ Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( 
const  Sequence<  An
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
 
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XDeleteRows::deleteRows", *this );
-    return Sequence< sal_Int32 >();
 }
 
 bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> 
&_xIndex)
diff --git a/connectivity/source/drivers/file/FConnection.cxx 
b/connectivity/source/drivers/file/FConnection.cxx
index 38ce342cb5e2..ffe804b021d9 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -239,7 +239,6 @@ Reference< XPreparedStatement > SAL_CALL 
OConnection::prepareStatement( const OU
 Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const 
OUString& /*sql*/ )
 {
     throwFeatureNotImplementedSQLException( "XConnection::prepareCall", *this 
);
-    return nullptr;
 }
 
 OUString SAL_CALL OConnection::nativeSQL( const OUString& sql )
diff --git a/connectivity/source/drivers/file/FDriver.cxx 
b/connectivity/source/drivers/file/FDriver.cxx
index b24c4e67a532..a72aa161fe58 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -153,7 +153,6 @@ Sequence< DriverPropertyInfo > SAL_CALL 
OFileDriver::getPropertyInfo( const OUSt
         const OUString sMessage = 
aResources.getResourceString(STR_URI_SYNTAX_ERROR);
         ::dbtools::throwGenericSQLException(sMessage ,*this);
     } // if ( ! acceptsURL(url) )
-    return Sequence< DriverPropertyInfo >();
 }
 
 sal_Int32 SAL_CALL OFileDriver::getMajorVersion(  )
diff --git a/connectivity/source/drivers/file/FResultSet.cxx 
b/connectivity/source/drivers/file/FResultSet.cxx
index 5612c68feedf..b89cf38bd285 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -182,8 +182,6 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& 
columnName )
     }
 
     ::dbtools::throwInvalidColumnException( columnName, *this );
-    assert(false);
-    return 0; // Never reached
 }
 
 const ORowSetValue& OResultSet::getValue(sal_Int32 columnIndex)
diff --git a/connectivity/source/drivers/firebird/Blob.cxx 
b/connectivity/source/drivers/firebird/Blob.cxx
index 26a5deaca0b4..036770556b91 100644
--- a/connectivity/source/drivers/firebird/Blob.cxx
+++ b/connectivity/source/drivers/firebird/Blob.cxx
@@ -235,14 +235,12 @@ sal_Int64 SAL_CALL  Blob::position(const uno::Sequence< 
sal_Int8 >& /*rPattern*/
                                    sal_Int64 /*nStart*/)
 {
     ::dbtools::throwFeatureNotImplementedSQLException("Blob::position", *this);
-    return 0;
 }
 
 sal_Int64 SAL_CALL  Blob::positionOfBlob(const uno::Reference< XBlob >& 
/*rPattern*/,
                                          sal_Int64 /*aStart*/)
 {
     ::dbtools::throwFeatureNotImplementedSQLException("Blob::positionOfBlob", 
*this);
-    return 0;
 }
 
 // ---- XInputStream ----------------------------------------------------------
diff --git a/connectivity/source/drivers/firebird/Clob.cxx 
b/connectivity/source/drivers/firebird/Clob.cxx
index dde050edee3a..422117f9ef81 100644
--- a/connectivity/source/drivers/firebird/Clob.cxx
+++ b/connectivity/source/drivers/firebird/Clob.cxx
@@ -128,14 +128,12 @@ sal_Int64 SAL_CALL Clob::position(const OUString& 
/*rPattern*/,
                                    sal_Int32 /*nStart*/)
 {
     ::dbtools::throwFeatureNotImplementedSQLException("Clob::position", *this);
-    return 0;
 }
 
 sal_Int64 SAL_CALL Clob::positionOfClob(const Reference <XClob >& /*rPattern*/,
                                          sal_Int64 /*aStart*/)
 {
     ::dbtools::throwFeatureNotImplementedSQLException("Clob::positionOfClob", 
*this);
-    return 0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/connectivity/source/drivers/firebird/Connection.cxx 
b/connectivity/source/drivers/firebird/Connection.cxx
index 5a2be8872485..329f7ad95ea3 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -746,7 +746,6 @@ void SAL_CALL Connection::setCatalog(const OUString& 
/*catalog*/)
 OUString SAL_CALL Connection::getCatalog()
 {
     ::dbtools::throwFunctionNotSupportedSQLException("getCatalog", *this);
-    return OUString();
 }
 
 void SAL_CALL Connection::setTransactionIsolation( sal_Int32 level )
@@ -769,7 +768,6 @@ sal_Int32 SAL_CALL Connection::getTransactionIsolation(  )
 Reference< XNameAccess > SAL_CALL Connection::getTypeMap()
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XConnection::getTypeMap", *this );
-    return nullptr;
 }
 
 void SAL_CALL Connection::setTypeMap(const Reference< XNameAccess >&)
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx 
b/connectivity/source/drivers/firebird/ResultSet.cxx
index ea3ac86ae762..c4703dec20f5 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -153,14 +153,12 @@ sal_Bool SAL_CALL OResultSet::previous()
 {
     ::dbtools::throwFunctionNotSupportedSQLException("previous not supported 
in firebird",
                                                   *this);
-    return false;
 }
 
 sal_Bool SAL_CALL OResultSet::isLast()
 {
     ::dbtools::throwFunctionNotSupportedSQLException("isLast not supported in 
firebird",
                                                   *this);
-    return false;
 }
 
 sal_Bool SAL_CALL OResultSet::isBeforeFirst()
@@ -234,7 +232,6 @@ sal_Bool SAL_CALL OResultSet::last()
     // row, hence we can't actually move to last.
     ::dbtools::throwFunctionNotSupportedSQLException("last not supported in 
firebird",
                                                   *this);
-    return false;
 }
 
 sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 aRow)
@@ -334,8 +331,6 @@ sal_Int32 SAL_CALL OResultSet::findColumn(const OUString& 
rColumnName)
     }
 
     ::dbtools::throwInvalidColumnException(rColumnName, *this);
-    assert(false);
-    return 0; // Never reached
 }
 
 uno::Reference< XInputStream > SAL_CALL OResultSet::getBinaryStream( sal_Int32 
)
@@ -849,20 +844,18 @@ sal_Bool SAL_CALL OResultSet::rowDeleted()
 {
     ::dbtools::throwFunctionNotSupportedSQLException("rowDeleted not supported 
in firebird",
                                                   *this);
-    return false;
 }
+
 sal_Bool SAL_CALL OResultSet::rowInserted()
 {
     ::dbtools::throwFunctionNotSupportedSQLException("rowInserted not 
supported in firebird",
                                                   *this);
-    return false;
 }
 
 sal_Bool SAL_CALL OResultSet::rowUpdated()
 {
     ::dbtools::throwFunctionNotSupportedSQLException("rowUpdated not supported 
in firebird",
                                                   *this);
-    return false;
 }
 
 void SAL_CALL OResultSet::refreshRow()
@@ -871,7 +864,6 @@ void SAL_CALL OResultSet::refreshRow()
                                                   *this);
 }
 
-
 void SAL_CALL OResultSet::cancel(  )
 {
     MutexGuard aGuard(m_rMutex);
diff --git a/connectivity/source/drivers/flat/EConnection.cxx 
b/connectivity/source/drivers/flat/EConnection.cxx
index a65470caaad9..941180a46e39 100644
--- a/connectivity/source/drivers/flat/EConnection.cxx
+++ b/connectivity/source/drivers/flat/EConnection.cxx
@@ -168,7 +168,6 @@ Reference< XPreparedStatement > SAL_CALL 
OFlatConnection::prepareCall( const OUS
     checkDisposed(OConnection_B::rBHelper.bDisposed);
 
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XConnection::prepareCall", *this );
-    return nullptr;
 }
 
 
diff --git a/connectivity/source/drivers/flat/EDriver.cxx 
b/connectivity/source/drivers/flat/EDriver.cxx
index 034e1b0b97f4..c214d2b2fca6 100644
--- a/connectivity/source/drivers/flat/EDriver.cxx
+++ b/connectivity/source/drivers/flat/EDriver.cxx
@@ -128,7 +128,6 @@ Sequence< DriverPropertyInfo > SAL_CALL 
ODriver::getPropertyInfo( const OUString
     ::connectivity::SharedResources aResources;
     const OUString sMessage = 
aResources.getResourceString(STR_URI_SYNTAX_ERROR);
     ::dbtools::throwGenericSQLException(sMessage ,*this);
-    return Sequence< DriverPropertyInfo >();
 }
 
 
diff --git a/connectivity/source/drivers/jdbc/Blob.cxx 
b/connectivity/source/drivers/jdbc/Blob.cxx
index 4531fc9b8724..70d35cda78fa 100644
--- a/connectivity/source/drivers/jdbc/Blob.cxx
+++ b/connectivity/source/drivers/jdbc/Blob.cxx
@@ -138,7 +138,6 @@ sal_Int64 SAL_CALL java_sql_Blob::positionOfBlob( const 
css::uno::Reference< css
     // to translated pattern into a byte[] -, we defer this functionality for 
the moment (hey, it was
     // unusable, anyway)
     // #i57457#
-    return 0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/Clob.cxx 
b/connectivity/source/drivers/jdbc/Clob.cxx
index 6108981aca89..f7926a2d465a 100644
--- a/connectivity/source/drivers/jdbc/Clob.cxx
+++ b/connectivity/source/drivers/jdbc/Clob.cxx
@@ -120,13 +120,6 @@ sal_Int64 SAL_CALL java_sql_Clob::position( const 
OUString& searchstr, sal_Int32
 sal_Int64 SAL_CALL java_sql_Clob::positionOfClob( const css::uno::Reference< 
css::sdbc::XClob >& /*pattern*/, sal_Int64 /*start*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XClob::positionOfClob", *this );
-    // this was put here in CWS warnings01. The previous implementation was 
defective, as it did ignore
-    // the pattern parameter. Since the effort for proper implementation is 
rather high - we would need
-    // to translated pattern into a byte[] -, we defer this functionality for 
the moment (hey, it was
-    // unusable, anyway)
-    // 2005-11-15 / #i57457# / frank.schoenh...@sun.com
-    return 0;
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx 
b/connectivity/source/drivers/jdbc/JDriver.cxx
index f294d30b4937..0bb568e2aabb 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -208,7 +208,6 @@ Sequence< DriverPropertyInfo > SAL_CALL 
java_sql_Driver::getPropertyInfo( const
     ::connectivity::SharedResources aResources;
     const OUString sMessage = 
aResources.getResourceString(STR_URI_SYNTAX_ERROR);
     ::dbtools::throwGenericSQLException(sMessage ,*this);
-    return Sequence< DriverPropertyInfo >();
 }
 
 sal_Int32 SAL_CALL java_sql_Driver::getMajorVersion(  )
diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx 
b/connectivity/source/drivers/macab/MacabResultSet.cxx
index 4142fcb6cce0..e8784ba3a8a8 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.cxx
@@ -394,8 +394,7 @@ Date SAL_CALL MacabResultSet::getDate(sal_Int32)
 
     ::dbtools::throwFunctionNotSupportedSQLException("getDate", nullptr);
 
-    Date aRet;
-    return aRet;
+    return Date();
 }
 
 Time SAL_CALL MacabResultSet::getTime(sal_Int32)
@@ -405,8 +404,7 @@ Time SAL_CALL MacabResultSet::getTime(sal_Int32)
 
     ::dbtools::throwFunctionNotSupportedSQLException("getTime", nullptr);
 
-    css::util::Time nRet;
-    return nRet;
+    return css::util::Time();
 }
 
 DateTime SAL_CALL MacabResultSet::getTimestamp(sal_Int32 columnIndex)
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx 
b/connectivity/source/drivers/odbc/OConnection.cxx
index b483165212b4..eeb27367b180 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -292,7 +292,6 @@ Reference< XPreparedStatement > SAL_CALL 
OConnection::prepareStatement( const OU
 Reference< XPreparedStatement > SAL_CALL OConnection::prepareCall( const 
OUString& /*sql*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XConnection::prepareCall", *this );
-    return nullptr;
 }
 
 OUString SAL_CALL OConnection::nativeSQL( const OUString& sql )
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx 
b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index 5fbe8bf8f460..796c63ab9ef3 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -150,8 +150,6 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( 
const OUString& colum
     }
 
     ::dbtools::throwInvalidColumnException( columnName, *this );
-    assert(false);
-    return 0; // Never reached
 }
 
 template < typename T, SQLSMALLINT sqlTypeId > T 
ODatabaseMetaDataResultSet::getInteger ( sal_Int32 columnIndex )
@@ -182,16 +180,13 @@ template < typename T, SQLSMALLINT sqlTypeId > T 
ODatabaseMetaDataResultSet::get
 Reference< css::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", 
*this );
-    return nullptr;
 }
 
 Reference< css::io::XInputStream > SAL_CALL 
ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( 
"XRow::getCharacterStream", *this );
-    return nullptr;
 }
 
-
 sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 
columnIndex )
 {
 
@@ -342,33 +337,28 @@ Reference< XResultSetMetaData > SAL_CALL 
ODatabaseMetaDataResultSet::getMetaData
 Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getArray", *this 
);
-    return nullptr;
 }
 
 Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getClob", *this );
-    return nullptr;
 }
 
 Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBlob", *this );
-    return nullptr;
 }
 
 
 Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 
/*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getRef", *this );
-    return nullptr;
 }
 
 
 Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 /*columnIndex*/, 
const Reference< css::container::XNameAccess >& /*typeMap*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getObject", *this 
);
-    return Any();
 }
 
 
diff --git a/connectivity/source/drivers/odbc/ODriver.cxx 
b/connectivity/source/drivers/odbc/ODriver.cxx
index cf3c5596aad4..95ea14234f20 100644
--- a/connectivity/source/drivers/odbc/ODriver.cxx
+++ b/connectivity/source/drivers/odbc/ODriver.cxx
@@ -176,7 +176,6 @@ Sequence< DriverPropertyInfo > SAL_CALL 
ODBCDriver::getPropertyInfo( const OUStr
     ::connectivity::SharedResources aResources;
     const OUString sMessage = 
aResources.getResourceString(STR_URI_SYNTAX_ERROR);
     ::dbtools::throwGenericSQLException(sMessage ,*this);
-    return Sequence< DriverPropertyInfo >();
 }
 
 sal_Int32 SAL_CALL ODBCDriver::getMajorVersion(  )
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx 
b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 21baa12e45c1..90045a46277e 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -656,15 +656,11 @@ void SAL_CALL OPreparedStatement::addBatch( )
     ::dbtools::throwFunctionNotSupportedSQLException( 
"XPreparedBatchExecution::addBatch", *this );
 }
 
-
 Sequence< sal_Int32 > SAL_CALL OPreparedStatement::executeBatch(  )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( 
"XPreparedBatchExecution::executeBatch", *this );
-    // not reached, but keep -Werror happy
-    return Sequence< sal_Int32 > ();
 }
 
-
 // methods
 
 
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx 
b/connectivity/source/drivers/odbc/OResultSet.cxx
index 9e68cd1763c2..f74cbf197979 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -369,8 +369,6 @@ sal_Int32 SAL_CALL OResultSet::findColumn( const OUString& 
columnName )
     }
 
     ::dbtools::throwInvalidColumnException( columnName, *this );
-    assert(false);
-    return 0; // Never reached
 }
 
 void OResultSet::ensureCacheForColumn(sal_Int32 columnIndex)
@@ -408,8 +406,6 @@ Reference< XInputStream > SAL_CALL 
OResultSet::getBinaryStream( sal_Int32 /*colu
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
 
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", 
*this );
-
-    return nullptr;
 }
 
 Reference< XInputStream > SAL_CALL OResultSet::getCharacterStream( sal_Int32 
/*columnIndex*/ )
@@ -418,8 +414,6 @@ Reference< XInputStream > SAL_CALL 
OResultSet::getCharacterStream( sal_Int32 /*c
     checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
 
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBinaryStream", 
*this );
-
-    return nullptr;
 }
 
 template < typename T > T OResultSet::impl_getValue( const sal_Int32 
_nColumnIndex, SQLSMALLINT nType )
@@ -598,30 +592,23 @@ Reference< XResultSetMetaData > SAL_CALL 
OResultSet::getMetaData(  )
 Reference< XArray > SAL_CALL OResultSet::getArray( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getArray", *this 
);
-    return nullptr;
 }
 
-
 Reference< XClob > SAL_CALL OResultSet::getClob( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getClob", *this );
-    return nullptr;
 }
 
 Reference< XBlob > SAL_CALL OResultSet::getBlob( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getBlob", *this );
-    return nullptr;
 }
 
-
 Reference< XRef > SAL_CALL OResultSet::getRef( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "XRow::getRef", *this );
-    return nullptr;
 }
 
-
 Any SAL_CALL OResultSet::getObject( sal_Int32 columnIndex, const Reference< 
css::container::XNameAccess >& /*typeMap*/ )
 {
     return getValue<ORowSetValue>( columnIndex ).makeAny();
@@ -1250,7 +1237,6 @@ sal_Bool SAL_CALL OResultSet::hasOrderedBookmarks(  )
 sal_Int32 SAL_CALL OResultSet::hashBookmark( const  Any& /*bookmark*/ )
 {
     ::dbtools::throwFunctionNotSupportedSQLException( 
"XRowLocate::hashBookmark", *this );
-    return 0;
 }
 
 // XDeleteRows
@@ -1378,15 +1364,9 @@ bool  OResultSet::isBookmarkable() const
     return (m_nUseBookmarks != SQL_UB_OFF) && (nAttr & SQL_CA1_BOOKMARK) == 
SQL_CA1_BOOKMARK;
 }
 
-void OResultSet::setFetchDirection(sal_Int32 _par0)
+void OResultSet::setFetchDirection(sal_Int32 /*_par0*/)
 {
     ::dbtools::throwFunctionNotSupportedSQLException( "setFetchDirection", 
*this );
-
-    OSL_ENSURE(_par0>0,"Illegal fetch direction!");
-    if ( _par0 > 0 )
-    {
-        setStmtOption<SQLULEN, SQL_IS_UINTEGER>(SQL_ATTR_CURSOR_TYPE, _par0);
-    }
 }
 
 void OResultSet::setFetchSize(sal_Int32 _par0)
diff --git a/connectivity/source/drivers/postgresql/pq_resultset.cxx 
b/connectivity/source/drivers/postgresql/pq_resultset.cxx
index 0058041c87b5..c2f16cc3eaf4 100644
--- a/connectivity/source/drivers/postgresql/pq_resultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_resultset.cxx
@@ -165,7 +165,6 @@ sal_Int32 ResultSet::findColumn( const OUString& columnName 
)
     else
     {
         ::dbtools::throwInvalidColumnException( columnName, *this );
-        assert(false);
     }
     return res;
 }
diff --git a/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx 
b/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx
index defb99906048..b85ed976a877 100644
--- a/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_sequenceresultset.cxx
@@ -117,8 +117,6 @@ sal_Int32 SAL_CALL SequenceResultSet::findColumn(
         }
     }
     ::dbtools::throwInvalidColumnException( columnName, *this );
-    assert(false);
-    return 0; // Never reached
 }
 }
 
diff --git a/connectivity/source/drivers/writer/WConnection.cxx 
b/connectivity/source/drivers/writer/WConnection.cxx
index c9900a4e5544..65be4e345d83 100644
--- a/connectivity/source/drivers/writer/WConnection.cxx
+++ b/connectivity/source/drivers/writer/WConnection.cxx
@@ -237,7 +237,6 @@ uno::Reference<sdbc::XPreparedStatement>
     checkDisposed(OConnection_BASE::rBHelper.bDisposed);
 
     
::dbtools::throwFeatureNotImplementedSQLException("XConnection::prepareCall", 
*this);
-    return nullptr;
 }
 
 } // namespace
diff --git a/connectivity/source/sdbcx/VCollection.cxx 
b/connectivity/source/sdbcx/VCollection.cxx
index 0fa6cace50e0..c9ada7cf59e6 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -433,10 +433,7 @@ void OCollection::notifyElementRemoved(const OUString& 
_sName)
 sal_Int32 SAL_CALL OCollection::findColumn( const OUString& columnName )
 {
     if ( !m_pElements->exists(columnName) )
-    {
         ::dbtools::throwInvalidColumnException( columnName, static_cast< 
XIndexAccess*>(this) );
-        O3TL_UNREACHABLE;
-    }
 
     return m_pElements->findColumn(columnName) + 1; // because columns start 
at one
 }
diff --git a/connectivity/source/sdbcx/VUser.cxx 
b/connectivity/source/sdbcx/VUser.cxx
index 85d09523c864..2aabd67576d9 100644
--- a/connectivity/source/sdbcx/VUser.cxx
+++ b/connectivity/source/sdbcx/VUser.cxx
@@ -118,7 +118,6 @@ sal_Int32 SAL_CALL OUser::getPrivileges( const OUString& 
/*objName*/, sal_Int32
     ::osl::MutexGuard aGuard(m_aMutex);
     checkDisposed(OUser_BASE::rBHelper.bDisposed);
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XAuthorizable::changePassword", *this );
-    O3TL_UNREACHABLE;
 }
 
 sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const OUString& /*objName*/, 
sal_Int32 /*objType*/ )
@@ -126,7 +125,6 @@ sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const 
OUString& /*objName*/, s
     ::osl::MutexGuard aGuard(m_aMutex);
     checkDisposed(OUser_BASE::rBHelper.bDisposed);
     ::dbtools::throwFeatureNotImplementedSQLException( 
"XAuthorizable::getGrantablePrivileges", *this );
-    O3TL_UNREACHABLE;
 }
 
 void SAL_CALL OUser::grantPrivileges( const OUString& /*objName*/, sal_Int32 
/*objType*/, sal_Int32 /*objPrivileges*/ )
diff --git a/dbaccess/source/core/api/RowSetBase.cxx 
b/dbaccess/source/core/api/RowSetBase.cxx
index 042f1fabc2d0..c1731ee18916 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -372,7 +372,6 @@ Any SAL_CALL ORowSetBase::getObject( sal_Int32 columnIndex, 
const Reference< XNa
 Reference< XRef > SAL_CALL ORowSetBase::getRef( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getRef", 
*m_pMySelf );
-    return nullptr;
 }
 
 Reference< XBlob > SAL_CALL ORowSetBase::getBlob( sal_Int32 columnIndex )
@@ -388,7 +387,6 @@ Reference< XClob > SAL_CALL ORowSetBase::getClob( sal_Int32 
columnIndex )
 Reference< XArray > SAL_CALL ORowSetBase::getArray( sal_Int32 /*columnIndex*/ )
 {
     ::dbtools::throwFeatureNotImplementedSQLException( "XRow::getArray", 
*m_pMySelf );
-    return nullptr;
 }
 
 // css::sdbcx::XRowLocate
diff --git a/dbaccess/source/ui/browser/formadapter.cxx 
b/dbaccess/source/ui/browser/formadapter.cxx
index 24791b44fff5..36a7a2492b74 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -297,8 +297,6 @@ sal_Int32 SAL_CALL SbaXFormAdapter::findColumn(const 
OUString& columnName)
         return xIface->findColumn(columnName);
 
     ::dbtools::throwInvalidColumnException( columnName, *this );
-    assert(false);
-    return 0; // Never reached
 }
 
 // css::sdbcx::XColumnsSupplier
diff --git a/include/connectivity/dbexception.hxx 
b/include/connectivity/dbexception.hxx
index 7166ec2ef6c4..58705a3e0561 100644
--- a/include/connectivity/dbexception.hxx
+++ b/include/connectivity/dbexception.hxx
@@ -212,13 +212,13 @@ OOO_DLLPUBLIC_DBTOOLS OUString getStandardSQLState( 
StandardSQLState _eState );
 
     @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwFunctionNotSupportedSQLException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwFunctionNotSupportedSQLException(
         const OUString& _rFunctionName,
         const css::uno::Reference< css::uno::XInterface >& _rxContext
     );
 
 /// @throws css::uno::RuntimeException
-OOO_DLLPUBLIC_DBTOOLS void throwFunctionNotSupportedRuntimeException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void 
throwFunctionNotSupportedRuntimeException(
         const OUString& _rFunctionName,
         const css::uno::Reference< css::uno::XInterface >& _rxContext
     );
@@ -227,7 +227,7 @@ OOO_DLLPUBLIC_DBTOOLS void 
throwFunctionNotSupportedRuntimeException(
 
     @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwFunctionSequenceException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwFunctionSequenceException(
         const css::uno::Reference< css::uno::XInterface >& Context,
         const css::uno::Any& Next = css::uno::Any()
     );
@@ -237,7 +237,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwFunctionSequenceException(
 
     @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwInvalidIndexException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwInvalidIndexException(
         const css::uno::Reference< css::uno::XInterface >& Context,
         const css::uno::Any& Next = css::uno::Any()
     );
@@ -247,7 +247,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwInvalidIndexException(
 
     @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwGenericSQLException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwGenericSQLException(
         const OUString& _rMsg,
         const css::uno::Reference< css::uno::XInterface >& _rxSource
     );
@@ -257,7 +257,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwGenericSQLException(
 
     @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwGenericSQLException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwGenericSQLException(
         const OUString& _rMsg,
         const css::uno::Reference< css::uno::XInterface >& _rxSource,
         const css::uno::Any& _rNextException
@@ -272,7 +272,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwGenericSQLException(
         the context of the exception
     @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwFeatureNotImplementedSQLException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwFeatureNotImplementedSQLException(
         const OUString& _rFeatureName,
         const css::uno::Reference< css::uno::XInterface >& _rxContext,
         const css::uno::Any& _rNextException = css::uno::Any()
@@ -286,7 +286,7 @@ OOO_DLLPUBLIC_DBTOOLS void 
throwFeatureNotImplementedSQLException(
         the context of the exception
     @throws css::uno::RuntimeException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwFeatureNotImplementedRuntimeException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void 
throwFeatureNotImplementedRuntimeException(
         const OUString& _rFeatureName,
         const css::uno::Reference< css::uno::XInterface >& _rxContext
     );
@@ -298,7 +298,7 @@ OOO_DLLPUBLIC_DBTOOLS void 
throwFeatureNotImplementedRuntimeException(
         the context of the exception
     @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwInvalidColumnException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwInvalidColumnException(
         const OUString& _rColumnName,
         const css::uno::Reference< css::uno::XInterface >& _rxContext
     );
@@ -306,7 +306,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwInvalidColumnException(
 
 /** @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwSQLException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwSQLException(
         const OUString& _rMessage,
         const OUString& _rSQLState,
         const css::uno::Reference< css::uno::XInterface >& _rxContext,
@@ -316,7 +316,7 @@ OOO_DLLPUBLIC_DBTOOLS void throwSQLException(
 
 /** @throws css::sdbc::SQLException
 */
-OOO_DLLPUBLIC_DBTOOLS void throwSQLException(
+[[noreturn]] OOO_DLLPUBLIC_DBTOOLS void throwSQLException(
         const OUString& _rMessage,
         StandardSQLState _eSQLState,
         const css::uno::Reference< css::uno::XInterface >& _rxContext,

Reply via email to