diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 16:42:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 16:42:16 +0200 |
commit | 14cd5182c5f64c43581c82db8c958369152226ac (patch) | |
tree | 57f150ba2707f29214eeb9b1eaad2373780d1b15 /connectivity/source/drivers | |
parent | e4bb2b4f4875c15bd68297b5be716edd6859841e (diff) |
Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough. (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)
Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.) C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.
Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
Diffstat (limited to 'connectivity/source/drivers')
4 files changed, 5 insertions, 5 deletions
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 2bee713c72de..391a5edc05a8 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1289,7 +1289,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) break; case DataType::LONGVARBINARY: bBinary = true; - // run through + SAL_FALLTHROUGH; case DataType::LONGVARCHAR: cTyp = 'M'; break; @@ -1770,7 +1770,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo case DataType::DOUBLE: case DataType::TIMESTAMP: bSetZero = true; - //fall-through + SAL_FALLTHROUGH; case DataType::LONGVARBINARY: case DataType::DATE: case DataType::BIT: diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index dd2748cd091b..25d95d842b20 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -240,7 +240,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables( break; case -1: bKnowCaseSensivity = false; - /** run through */ + SAL_FALLTHROUGH; case 0: bCaseSensitiveDir = false; } diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 0626560da9ca..a79ded6cc85c 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -734,7 +734,7 @@ bool OFlatTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32 n { case IResultSetHelper::FIRST: m_nRowPos = 0; - // run through + SAL_FALLTHROUGH; case IResultSetHelper::NEXT: { assert(m_nRowPos >= 0); diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index c55834dbd214..df51a3b62aa0 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -1224,8 +1224,8 @@ bool implSetObject( const Reference< XParameters >& _rxParameters, _rxParameters->setBinaryStream(_nColumnIndex, xStream, xStream->available()); break; } + SAL_FALLTHROUGH; } - // run through default: bSuccessfullyReRouted = false; |