Skip to content
Snippets Groups Projects
Verified Commit 338b9afd authored by Diederik de Haas's avatar Diederik de Haas
Browse files

d/patches: Add "Suppress several warnings of implicit fall through" patch

parent 08dacf7c
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ rrdtool (1.8.0-1) UNRELEASED; urgency=medium
- "Fix BUILD_DATE in rrdtool help output"
- "Fix unsigned integer overflow in rrdtool first"
- "Remove autogenerated files"
- "Suppress several warnings of implicit fall through"
-- Jean-Michel Vourgère <nirgal@debian.org> Mon, 21 Mar 2022 10:55:32 +0100
......
From: NAKAJIMA Yusaku <yupong7@gmail.com>
Date: Thu, 28 Apr 2022 19:05:13 +0900
Subject: Suppress several warnings of implicit fall through
Origin: https://github.com/oetiker/rrdtool-1.x/commit/fbea00d42071335b19e6e092de97c61346e7904a
[diederik: Remove changes to CHANGES file]
---
src/rrd_daemon.c | 2 +-
src/rrd_strtod.c | 14 ++++++++++----
2 files changed, 11 insertions(+), 5 deletions(-)
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.39.2
......@@ -6,3 +6,4 @@ Update-Version-and-Copyright-year-in-git-files.patch
Fix-BUILD_DATE-in-rrdtool-help-output.patch
Fix-unsigned-integer-overflow-in-rrdtool-first.patch
Remove-autogenerated-files.patch
Suppress-several-warnings-of-implicit-fall-through.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment