aboutsummaryrefslogtreecommitdiffstats
path: root/src/string.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-04 19:43:55 +0200
committerDavid Robillard <d@drobilla.net>2018-09-04 21:16:18 +0200
commitd3e4e496a19a266ffac7c04fb7d54926e39f55a2 (patch)
treec3e2d5b9d64a678a7792c7c2be73ab4737b31576 /src/string.c
parent3267bb312f50746202226d29cc196bb47941e4d5 (diff)
downloadserd-d3e4e496a19a266ffac7c04fb7d54926e39f55a2.tar.gz
serd-d3e4e496a19a266ffac7c04fb7d54926e39f55a2.tar.bz2
serd-d3e4e496a19a266ffac7c04fb7d54926e39f55a2.zip
Fix fallthrough warnings with GCC8
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c
index 2f79f496..cde82134 100644
--- a/src/string.c
+++ b/src/string.c
@@ -103,9 +103,14 @@ read_sign(const char** sptr)
{
double sign = 1.0;
switch (**sptr) {
- case '-': sign = -1.0;
- case '+': ++(*sptr);
- default: return sign;
+ case '-':
+ sign = -1.0;
+ // fallthru
+ case '+':
+ ++(*sptr);
+ // fallthru
+ default:
+ return sign;
}
}