]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Suppress several warnings of implicit fall through 1176/head
authorNAKAJIMA Yusaku <yupong7@gmail.com>
Thu, 28 Apr 2022 10:05:13 +0000 (19:05 +0900)
committerNAKAJIMA Yusaku <yupong7@gmail.com>
Thu, 28 Apr 2022 10:05:13 +0000 (19:05 +0900)
CHANGES
src/rrd_daemon.c
src/rrd_strtod.c

diff --git a/CHANGES b/CHANGES
index 89ea0e5ee8778ae2eaf14e1a19b51b18bc8ead56..dc0fd017bc37f97035a88aea465f4dcf41d4d12e 100644 (file)
--- 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 <youpong>
 * Update tarball download link in doc <c72578>
 * Fix unsigned integer overflow in rrdtool first. Add test for rrd_first() <c72578>
 * Fix tests under MSYS2 (Windows) <c72578>
index cf125476f79f81894d61e95e039238cebdab741a..d51a8f3dd866ad6d792057c3db72f5617c907541 100644 (file)
@@ -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"
index f4105d89fc8aa6e930ac773b4cc35406812c734d..46dd2e8716aa1d5f31fc1fa7be2b62269a539b6e 100644 (file)
@@ -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