diff options
author | David Robillard <d@drobilla.net> | 2021-05-29 15:09:48 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-05-31 11:30:12 -0400 |
commit | 8fc6ee6582d77d04e7b500932b77e6c48c8c39a6 (patch) | |
tree | 9bb5b0dc9460466acbd0ad4359027a83b0abe6ee /src/string.c | |
parent | 0ea841d621f81240241fc36a0e6153f57ab88020 (diff) | |
download | serd-8fc6ee6582d77d04e7b500932b77e6c48c8c39a6.tar.gz serd-8fc6ee6582d77d04e7b500932b77e6c48c8c39a6.tar.bz2 serd-8fc6ee6582d77d04e7b500932b77e6c48c8c39a6.zip |
Fix unannotated switch fallthroughs
Unfortunately, clang does not support doing this with comments, requiring yet
more preprocessor gunk.
Diffstat (limited to 'src/string.c')
-rw-r--r-- | src/string.c | 11 |
1 files changed, 8 insertions, 3 deletions
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 |