Use BOOST_FALLTHROUGH in external code

...in preparation of enabling Clang's -Wimplicit-fallthrough

Change-Id: If64f9b18591b3cd2528adc6c2d6011d509d4afcd
This commit is contained in:
Stephan Bergmann 2016-05-10 15:25:12 +02:00
parent a0d546cdca
commit fcbd824f1b
3 changed files with 30 additions and 2 deletions

View File

@ -84,6 +84,8 @@ boost_patches += boost_1_60_0.undef.warning.patch
boost_patches += boost.wdeprecated-auto_ptr.patch.0
boost_patches += boost_1_60_0.android.undef.warning.patch
boost_patches += fallthrough.patch.0
$(eval $(call gb_UnpackedTarball_UnpackedTarball,boost))
$(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL)))

26
external/boost/fallthrough.patch.0 vendored Normal file
View File

@ -0,0 +1,26 @@
--- boost/format/parsing.hpp
+++ boost/format/parsing.hpp
@@ -267,6 +267,7 @@
switch ( wrap_narrow(fac, *start, 0) ) {
case 'X':
fpar->fmtstate_.flags_ |= std::ios_base::uppercase;
+ BOOST_FALLTHROUGH;
case 'p': // pointer => set hex.
case 'x':
fpar->fmtstate_.flags_ &= ~std::ios_base::basefield;
@@ -280,6 +281,7 @@
case 'E':
fpar->fmtstate_.flags_ |= std::ios_base::uppercase;
+ BOOST_FALLTHROUGH;
case 'e':
fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
fpar->fmtstate_.flags_ |= std::ios_base::scientific;
@@ -291,6 +293,7 @@
case 'f':
fpar->fmtstate_.flags_ &= ~std::ios_base::floatfield;
fpar->fmtstate_.flags_ |= std::ios_base::fixed;
+ BOOST_FALLTHROUGH;
case 'u':
case 'd':
case 'i':

View File

@ -564,8 +564,8 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo(sal_Int32 _parameterIndex, c
setDouble( _parameterIndex, nValue );
break;
}
BOOST_FALLTHROUGH;
}
// run through
case DataType::CHAR:
case DataType::VARCHAR:
@ -591,8 +591,8 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo(sal_Int32 _parameterIndex, c
setFloat(_parameterIndex,nValue);
break;
}
BOOST_FALLTHROUGH;
}
// run through if we couldn't set a float value
case DataType::DOUBLE:
{