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 /configmgr | |
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 'configmgr')
-rw-r--r-- | configmgr/source/access.cxx | 2 | ||||
-rw-r--r-- | configmgr/source/components.cxx | 4 | ||||
-rw-r--r-- | configmgr/source/configurationregistry.cxx | 2 | ||||
-rw-r--r-- | configmgr/source/type.cxx | 2 | ||||
-rw-r--r-- | configmgr/source/valueparser.cxx | 4 | ||||
-rw-r--r-- | configmgr/source/xcdparser.cxx | 2 | ||||
-rw-r--r-- | configmgr/source/xcsparser.cxx | 4 | ||||
-rw-r--r-- | configmgr/source/xcuparser.cxx | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 8742dcfcb530..9f14a6c6c174 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -695,7 +695,7 @@ void Access::setName(OUString const & aName) } } } - // fall through + SAL_FALLTHROUGH; case Node::KIND_LOCALIZED_PROPERTY: // renaming a property could only work for an extension property, // but a localized property is never an extension property diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 294001b03299..5b6271b370f5 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -650,7 +650,7 @@ void Components::parseFiles( if (!recursive) { return; } - // fall through + SAL_FALLTHROUGH; default: throw css::uno::RuntimeException( "cannot open directory " + url); @@ -808,7 +808,7 @@ void Components::parseXcsXcuIniLayer( case ':': case '\\': prefix.append('\\'); - // fall through + SAL_FALLTHROUGH; default: prefix.append(c); } diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx index b91bd1db21ee..437cc798d335 100644 --- a/configmgr/source/configurationregistry.cxx +++ b/configmgr/source/configurationregistry.cxx @@ -517,7 +517,7 @@ css::registry::RegistryValueType RegistryKey::getValueType() { return css::registry::RegistryValueType_STRINGLIST; } - // fall through + SAL_FALLTHROUGH; default: return css::registry::RegistryValueType_NOT_DEFINED; } diff --git a/configmgr/source/type.cxx b/configmgr/source/type.cxx index 3a91505b395e..9924aef4d4d4 100644 --- a/configmgr/source/type.cxx +++ b/configmgr/source/type.cxx @@ -155,7 +155,7 @@ Type getDynamicType(css::uno::Any const & value) { return TYPE_HEXBINARY_LIST; } } - // fall through + SAL_FALLTHROUGH; default: return TYPE_ERROR; } diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx index eb81d738e8a4..f8d98dde2d76 100644 --- a/configmgr/source/valueparser.cxx +++ b/configmgr/source/valueparser.cxx @@ -260,7 +260,7 @@ xmlreader::XmlReader::Text ValueParser::getTextMode() const { if (!items_.empty()) { break; } - // fall through + SAL_FALLTHROUGH; case STATE_IT: return (type_ == TYPE_STRING || type_ == TYPE_STRING_LIST || @@ -292,7 +292,7 @@ bool ValueParser::startElement( state_ = STATE_IT; return true; } - // fall through + SAL_FALLTHROUGH; case STATE_IT: if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals("unicode") && diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx index e26298b0211e..0bfe298fd08c 100644 --- a/configmgr/source/xcdparser.cxx +++ b/configmgr/source/xcdparser.cxx @@ -116,7 +116,7 @@ bool XcdParser::startElement( return true; } state_ = STATE_COMPONENTS; - // fall through + SAL_FALLTHROUGH; case STATE_COMPONENTS: if (nsId == ParseManager::NAMESPACE_OOR && name.equals("component-schema")) diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 844a69136a34..6c1b2fea9a4a 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -160,7 +160,7 @@ bool XcsParser::startElement( state_ = STATE_TEMPLATES; return true; } - // fall through + SAL_FALLTHROUGH; case STATE_TEMPLATES_DONE: if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && name.equals("component")) @@ -190,7 +190,7 @@ bool XcsParser::startElement( } break; } - // fall through + SAL_FALLTHROUGH; case STATE_COMPONENT: assert(!elements_.empty()); switch (elements_.top().node->kind()) { diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index ca811040ddcd..34e0eb5973c8 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -645,7 +645,7 @@ void XcuParser::handleUnknownGroupProp( recordModification(false); break; } - // fall through + SAL_FALLTHROUGH; default: SAL_WARN( "configmgr", |