summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-12 13:41:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-12 13:41:41 +0200
commit34499f08b560a33de35f34ec8ea2d9f2ffaf616b (patch)
tree7cfd7c85501808c64cbc816cebd3896b99ad9fe1 /configmgr
parent52909035af5e91e89a8baad3b74828e648628dd3 (diff)
Silence -Werror,-Wimplicit-fallthrough under NDEBUG
Change-Id: I030404b445f310a850e0fee2f7ff06baebc9932a
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/access.cxx11
1 files changed, 5 insertions, 6 deletions
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 <sal/config.h>
#include <cassert>
+#include <cstdlib>
#include <vector>
#include <com/sun/star/beans/Property.hpp>
@@ -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(