rt-tests/SOURCES/rt-tests-hackbench-Fix-compile-warning-about-fall-th.patch
2022-12-19 14:11:24 +00:00

31 lines
1011 B
Diff

From 4164006a834b93995fb3535508fdf18bff92df7d Mon Sep 17 00:00:00 2001
From: John Kacur <jkacur@redhat.com>
Date: Tue, 1 Nov 2022 09:50:03 -0400
Subject: [PATCH 3/4] rt-tests: hackbench: Fix compile warning about fall
through
print_usage_exit(0) never returns, but the compiler doesn't understand
this. In any case it is not harmful to add a break after this statement.
Do so to keep the unhelpful compiler warning from triggering.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/hackbench/hackbench.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c
index dda7690b79a0..69dd5f087fb6 100644
--- a/src/hackbench/hackbench.c
+++ b/src/hackbench/hackbench.c
@@ -444,6 +444,7 @@ static void process_options(int argc, char *argv[])
break;
case 'h':
print_usage_exit(0);
+ break;
case 'l':
if (!(argv[optind] && (loops = atoi(optarg)) > 0)) {
fprintf(stderr, "%s: --loops|-l requires an integer > 0\n", argv[0]);
--
2.38.1