From 64fa77675d9522988827fc4c263637dd6ffa9822 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 12 May 2016 17:25:03 +0200 Subject: Revert "Silence -Werror,-Wimplicit-fallthrough under NDEBUG" This reverts commit 544d2408e7d8c89ee9e6c802b5487b5a8fb6e0fd. Unconditionally calling abort() here was not the intention. --- sc/source/ui/view/viewfun6.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index 99b53a543cee..51e0e8b64e63 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -46,7 +46,6 @@ #include "globalnames.hxx" #include "inputhdl.hxx" -#include #include using ::std::vector; @@ -293,6 +292,10 @@ 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 ); @@ -301,8 +304,6 @@ void ScViewFunc::InsertCurrentTime(short nReqFmt, const OUString& rUndoStr) nFormat = nCurNumFormat; } break; - default: - for (;;) std::abort(); } if (!nFormat) @@ -385,10 +386,12 @@ 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) -- cgit