Use BOOST_FALLTHROUGH in external code
...in preparation of enabling Clang's -Wimplicit-fallthrough Change-Id: If64f9b18591b3cd2528adc6c2d6011d509d4afcd
This commit is contained in:
parent
a0d546cdca
commit
fcbd824f1b
2
external/boost/UnpackedTarball_boost.mk
vendored
2
external/boost/UnpackedTarball_boost.mk
vendored
@ -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
26
external/boost/fallthrough.patch.0
vendored
Normal 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':
|
@ -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:
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user