From 8fc6ee6582d77d04e7b500932b77e6c48c8c39a6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 May 2021 15:09:48 -0400 Subject: Fix unannotated switch fallthroughs Unfortunately, clang does not support doing this with comments, requiring yet more preprocessor gunk. --- src/string.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index b83ad58f..6c834cc4 100644 --- a/src/string.c +++ b/src/string.c @@ -66,6 +66,7 @@ serd_update_flags(const uint8_t c, SerdNodeFlags* const flags) break; case '"': *flags |= SERD_HAS_QUOTE; + break; default: break; } @@ -120,16 +121,20 @@ static inline double read_sign(const char** sptr) { double sign = 1.0; + switch (**sptr) { case '-': sign = -1.0; - // fallthru + ++(*sptr); + break; case '+': ++(*sptr); - // fallthru + break; default: - return sign; + break; } + + return sign; } double -- cgit v1.2.1