WaE: Unreachable code: Use SAL_WNOUNREACHABLE_CODE_PUSH/POP
Cleaner than my first attempt.
This reverts commit aa4868de78
.
Change-Id: I9c92be72e69292731983a53fc2de29ba333071c9
This commit is contained in:
@@ -46,20 +46,25 @@ BlobHelper::BlobHelper(const ::com::sun::star::uno::Sequence< sal_Int8 >& _val)
|
|||||||
return new ::comphelper::SequenceInputStream(m_aValue);
|
return new ::comphelper::SequenceInputStream(m_aValue);
|
||||||
}
|
}
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// The "return" after a call to throwFeatureNotImplementedException()
|
||||||
|
// (which always throws) will be detected as unreachable when doing
|
||||||
|
// global inlining.
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_PUSH
|
||||||
|
|
||||||
::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)
|
::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 );
|
::dbtools::throwFeatureNotImplementedException( "XBlob::position", *this );
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return 0;
|
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)
|
::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 );
|
::dbtools::throwFeatureNotImplementedException( "XBlob::positionOfBlob", *this );
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_POP
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -323,21 +323,23 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isAfterLast( ) throw(SQLException
|
|||||||
return m_bEOF;
|
return m_bEOF;
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_PUSH
|
||||||
|
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_POP
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, RuntimeException)
|
void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
@@ -361,46 +363,41 @@ void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeE
|
|||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_PUSH
|
||||||
|
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_POP
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) throw(SQLException, RuntimeException)
|
Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
@@ -408,29 +405,28 @@ Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) th
|
|||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_PUSH
|
||||||
|
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, RuntimeException)
|
||||||
{
|
{
|
||||||
::dbtools::throwFunctionSequenceException(*this);
|
::dbtools::throwFunctionSequenceException(*this);
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return sal_False;
|
return sal_False;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_POP
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
|
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
|
||||||
|
@@ -121,16 +121,15 @@ Reference< XNameAccess > SAL_CALL OUser::getGroups( ) throw(RuntimeException)
|
|||||||
return const_cast<OUser*>(this)->m_pGroups;
|
return const_cast<OUser*>(this)->m_pGroups;
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// -------------------------------------------------------------------------
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_PUSH
|
||||||
|
|
||||||
sal_Int32 SAL_CALL OUser::getPrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
|
sal_Int32 SAL_CALL OUser::getPrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
::osl::MutexGuard aGuard(m_aMutex);
|
::osl::MutexGuard aGuard(m_aMutex);
|
||||||
checkDisposed(OUser_BASE::rBHelper.bDisposed);
|
checkDisposed(OUser_BASE::rBHelper.bDisposed);
|
||||||
::dbtools::throwFeatureNotImplementedException( "XAuthorizable::changePassword", *this );
|
::dbtools::throwFeatureNotImplementedException( "XAuthorizable::changePassword", *this );
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return 0;
|
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)
|
sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const OUString& /*objName*/, sal_Int32 /*objType*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
|
||||||
@@ -138,10 +137,11 @@ sal_Int32 SAL_CALL OUser::getGrantablePrivileges( const OUString& /*objName*/, s
|
|||||||
::osl::MutexGuard aGuard(m_aMutex);
|
::osl::MutexGuard aGuard(m_aMutex);
|
||||||
checkDisposed(OUser_BASE::rBHelper.bDisposed);
|
checkDisposed(OUser_BASE::rBHelper.bDisposed);
|
||||||
::dbtools::throwFeatureNotImplementedException( "XAuthorizable::getGrantablePrivileges", *this );
|
::dbtools::throwFeatureNotImplementedException( "XAuthorizable::getGrantablePrivileges", *this );
|
||||||
#if !(defined(_MSC_VER) && defined(ENABLE_LTO))
|
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SAL_WNOUNREACHABLE_CODE_POP
|
||||||
|
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
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)
|
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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user