[Libreoffice-commits] core.git: configmgr/source

Stephan Bergmann sbergman at redhat.com
Thu May 12 11:42:15 UTC 2016


 configmgr/source/access.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 34499f08b560a33de35f34ec8ea2d9f2ffaf616b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 12 13:41:41 2016 +0200

    Silence -Werror,-Wimplicit-fallthrough under NDEBUG
    
    Change-Id: I030404b445f310a850e0fee2f7ff06baebc9932a

diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 9f14a6c..77af56f 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(


More information about the Libreoffice-commits mailing list