From 34499f08b560a33de35f34ec8ea2d9f2ffaf616b Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 12 May 2016 13:41:41 +0200 Subject: Silence -Werror,-Wimplicit-fallthrough under NDEBUG Change-Id: I030404b445f310a850e0fee2f7ff06baebc9932a --- configmgr/source/access.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'configmgr') diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 9f14a6c6c174..77af56f931af 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -1564,17 +1565,11 @@ std::vector< rtl::Reference< ChildAccess > > Access::getAllChildren() { void Access::checkValue(css::uno::Any const & value, Type type, bool nillable) { bool ok; switch (type) { - case TYPE_NIL: - assert(false); - // fall through (cannot happen) case TYPE_ERROR: ok = false; break; case TYPE_ANY: switch (getDynamicType(value)) { - case TYPE_ANY: - assert(false); - // fall through (cannot happen) case TYPE_ERROR: ok = false; break; @@ -1584,11 +1579,15 @@ void Access::checkValue(css::uno::Any const & value, Type type, bool nillable) { default: ok = true; break; + case TYPE_ANY: + for (;;) std::abort(); // cannot happen } break; default: ok = value.hasValue() ? value.isExtractableTo(mapType(type)) : nillable; break; + case TYPE_NIL: + for (;;) std::abort(); // cannot happen } if (!ok) { throw css::lang::IllegalArgumentException( -- cgit