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

Stephan Bergmann sbergman at redhat.com
Thu May 12 13:09:04 UTC 2016


 sc/source/ui/view/viewfun6.cxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 544d2408e7d8c89ee9e6c802b5487b5a8fb6e0fd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu May 12 15:08:31 2016 +0200

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

diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 51e0e8b..99b53a5 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -46,6 +46,7 @@
 #include "globalnames.hxx"
 #include "inputhdl.hxx"
 
+#include <cstdlib>
 #include <vector>
 
 using ::std::vector;
@@ -292,10 +293,6 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
                         nFormat = nCurNumFormat;
                 }
                 break;
-            default:
-                assert(!"unhandled current date/time request");
-                nReqFmt = css::util::NumberFormat::DATETIME;
-                // fallthru
             case css::util::NumberFormat::DATETIME:
                 {
                     DateTime aActDateTime( DateTime::SYSTEM );
@@ -304,6 +301,8 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
                         nFormat = nCurNumFormat;
                 }
                 break;
+            default:
+                for (;;) std::abort();
         }
 
         if (!nFormat)
@@ -386,12 +385,10 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr)
                         break;
                 }
                 break;
-            default:
-                assert(!"unhandled current date/time request");
-                nReqFmt = css::util::NumberFormat::DATETIME;
-                // fallthru
             case css::util::NumberFormat::DATETIME:
                 break;
+            default:
+                for (;;) std::abort();
         }
         double fVal = 0.0;
         switch (nReqFmt)


More information about the Libreoffice-commits mailing list