From a0a1f6455a255ce0759678f555e76fb7b187b5eb Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 25 Feb 2021 15:28:45 +0100 Subject: [PATCH] base/string.h: avoid fallthrough cases --- repos/base/include/util/string.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/repos/base/include/util/string.h b/repos/base/include/util/string.h index eb852fa0f0..8a656c5b70 100644 --- a/repos/base/include/util/string.h +++ b/repos/base/include/util/string.h @@ -439,12 +439,9 @@ namespace Genode { /* handle suffixes */ if (i > 0) switch (s[i]) { - case 'G': res *= 1024; - [[fallthrough]]; - case 'M': res *= 1024; - [[fallthrough]]; - case 'K': res *= 1024; i++; - [[fallthrough]]; + case 'G': res *= 1024*1024*1024; i++; break; + case 'M': res *= 1024*1024; i++; break; + case 'K': res *= 1024; i++; break; default: break; }