summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-09-04 01:37:58 +0300
committerTor Lillqvist <tml@collabora.com>2013-09-04 01:39:26 +0300
commitaa4868de78b3a3893722f7a079f4d05e18abd8db (patch)
treeff354d45785c779e028fa7dccd88f47f219344c3 /connectivity
parent340c546eca893a9d306e0a03b78c7f0341af8044 (diff)
WaE: Unreachable code
Noticed by the MS linker when doing link-time code generation (!). In all cases, a "return" after a call to a function that always throws an exception. To avoid other compilers perhaps warning about missing return of a value, put the "returns" inside ifdefs. Change-Id: I83aa04cb5c3ff8413d3ed4dc85fb57f2a41fd589
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/BlobHelper.cxx4
-rw-r--r--connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx20
-rw-r--r--connectivity/source/sdbcx/VUser.cxx4
3 files changed, 28 insertions, 0 deletions
diff --git a/connectivity/source/commontools/BlobHelper.cxx b/connectivity/source/commontools/BlobHelper.cxx
index 15b636347b35..513507239484 100644
--- a/connectivity/source/commontools/BlobHelper.cxx
+++ b/connectivity/source/commontools/BlobHelper.cxx
@@ -49,13 +49,17 @@ BlobHelper::BlobHelper(const ::com::sun::star::uno::Sequence< sal_Int8 >& _val)
::sal_Int64 SAL_CALL BlobHelper::position( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& /*pattern*/, ::sal_Int64 /*start*/ ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XBlob::position", *this );
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return 0;
+#endif
}
// -----------------------------------------------------------------------------
::sal_Int64 SAL_CALL BlobHelper::positionOfBlob( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob >& /*pattern*/, ::sal_Int64 /*start*/ ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XBlob::positionOfBlob", *this );
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return 0;
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
index 32d1e18eb879..7ebd380846dc 100644
--- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx
@@ -326,13 +326,17 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isAfterLast( ) throw(SQLException
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, RuntimeException)
@@ -360,32 +364,42 @@ void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeE
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) throw(SQLException, RuntimeException)
@@ -397,19 +411,25 @@ Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) th
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return sal_False;
+#endif
}
// -------------------------------------------------------------------------
diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx
index 4614688f7207..ad088aa7545b 100644
--- a/connectivity/source/sdbcx/VUser.cxx
+++ b/connectivity/source/sdbcx/VUser.cxx
@@ -128,7 +128,9 @@ sal_Int32 SAL_CALL OUser::getPrivileges( const OUString& /*objName*/, sal_Int32
::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OUser_BASE::rBHelper.bDisposed);
::dbtools::throwFeatureNotImplementedException( "XAuthorizable::changePassword", *this );
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return 0;
+#endif
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
@@ -136,7 +138,9 @@ sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const OUString& /*objName*/, s
::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OUser_BASE::rBHelper.bDisposed);
::dbtools::throwFeatureNotImplementedException( "XAuthorizable::getGrantablePrivileges", *this );
+#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
return 0;
+#endif
}
// -------------------------------------------------------------------------
void SAL_CALL OUser::grantPrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/, sal_Int32 /*objPrivileges*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)