From fbea00d42071335b19e6e092de97c61346e7904a Mon Sep 17 00:00:00 2001 From: NAKAJIMA Yusaku Date: Thu, 28 Apr 2022 19:05:13 +0900 Subject: [PATCH] Suppress several warnings of implicit fall through --- CHANGES | 3 ++- src/rrd_daemon.c | 2 +- src/rrd_strtod.c | 14 ++++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 89ea0e5e..dc0fd017 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,10 @@ -RRDtool git - 2022-04-08 +RRDtool git - 2022-04-28 ========================== Bugfixes -------- +* Suppress warnings of implicit fall through * Update tarball download link in doc * Fix unsigned integer overflow in rrdtool first. Add test for rrd_first() * Fix tests under MSYS2 (Windows) diff --git a/src/rrd_daemon.c b/src/rrd_daemon.c index cf125476..d51a8f3d 100644 --- a/src/rrd_daemon.c +++ b/src/rrd_daemon.c @@ -4889,7 +4889,7 @@ static int read_options( case '?': fprintf(stderr, "%s\n", options.errmsg); - /* no break */ + /* fall through */ case 'h': printf("RRDCacheD %s\n" diff --git a/src/rrd_strtod.c b/src/rrd_strtod.c index f4105d89..46dd2e87 100644 --- a/src/rrd_strtod.c +++ b/src/rrd_strtod.c @@ -110,8 +110,11 @@ double rrd_strtod(const char *str, char **endptr) { // Handle optional sign negative = 0; switch (*p) { - case '-': negative = 1; // Fall through to increment position - case '+': p++; + case '-': + negative = 1; + /* fall through */ + case '+': + p++; } number = 0.; @@ -153,8 +156,11 @@ double rrd_strtod(const char *str, char **endptr) { // Handle optional sign negative = 0; switch (*++p) { - case '-': negative = 1; // Fall through to increment pos - case '+': p++; + case '-': + negative = 1; + /* fall through */ + case '+': + p++; } // Process string of digits -- 2.47.2