summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-05-12 08:39:58 +0300
committerTor Lillqvist <tml@collabora.com>2016-05-12 08:47:32 +0300
commit1275d9614724308b97724dacb7713f07fdb173d0 (patch)
treecc4051496a43fe72b25eac7626e9d9b38fa23678 /sal/osl
parent7d3b676ce1ec99c64ec3ad3a3f94cb9d42c2128c (diff)
-Werror,-Wimplicit-fallthrough
Fix "fallthrough annotation in unreachable code". Clang is clever enough to know that code after assert(false) is unreachable in a non-NDEBUG build. Seriously, micro-optimisation of the case that should never be reached? Change-Id: I10d7ae60895437be52c27aa93539d17e0f091ac4
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/all/log.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index d122bbc0a032..9c75393bd327 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -63,9 +63,6 @@ bool equalStrings(
#if !defined ANDROID
char const * toString(sal_detail_LogLevel level) {
switch (level) {
- default:
- assert(false); // this cannot happen
- SAL_FALLTHROUGH;
case SAL_DETAIL_LOG_LEVEL_INFO:
return "info";
case SAL_DETAIL_LOG_LEVEL_WARN:
@@ -73,6 +70,9 @@ char const * toString(sal_detail_LogLevel level) {
case SAL_DETAIL_LOG_LEVEL_DEBUG:
case SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE:
return "debug";
+ default:
+ assert(false); // this cannot happen
+ return "broken";
}
}
#endif
@@ -244,9 +244,6 @@ void log(
case SAL_DETAIL_LOG_LEVEL_INFO:
prio = LOG_INFO;
break;
- default:
- assert(false); // this cannot happen
- SAL_FALLTHROUGH;
case SAL_DETAIL_LOG_LEVEL_WARN:
prio = LOG_WARNING;
break;
@@ -254,6 +251,9 @@ void log(
case SAL_DETAIL_LOG_LEVEL_DEBUG_TRACE:
prio = LOG_DEBUG;
break;
+ default:
+ assert(false); // this cannot happen
+ prio = LOG_WARNING;
}
syslog(prio, "%s", s.str().c_str());
#endif