diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-05-10 16:42:16 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2016-07-20 01:26:06 -0400 |
commit | e7b11300cd813f821d1ec5cb4633ce2c5f7d1b9f (patch) | |
tree | a6c39d9d4cde1baa84a9d788affbce3508af89a8 /configmgr | |
parent | 34f591ca95c4c63be092da4c4b2294230404f336 (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.
(cherry picked from commit 14cd5182c5f64c43581c82db8c958369152226ac)
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 3f4f9cae37a4..53bcf957cd0d 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -696,7 +696,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 b1b4b725c579..c0ad6f2cb673 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 23bf85e88027..241bff5f6167 100644 --- a/configmgr/source/type.cxx +++ b/configmgr/source/type.cxx @@ -156,7 +156,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 c98067b9d304..5026f5d3b678 100644 --- a/configmgr/source/xcdparser.cxx +++ b/configmgr/source/xcdparser.cxx @@ -117,7 +117,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 4d239ab4f1f9..a89ab668f020 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -646,7 +646,7 @@ void XcuParser::handleUnknownGroupProp( recordModification(false); break; } - // fall through + SAL_FALLTHROUGH; default: SAL_WARN( "configmgr", |