diff mbox series

[13/17] rt-tests: rt-utils: Suppress warnings about fallthrough

Message ID 20231006184011.26699-13-jkacur@redhat.com
State New
Headers show
Series [01/17] rt-tests: cyclictest: Remove warnings due different signedness in comparison | expand

Commit Message

John Kacur Oct. 6, 2023, 6:40 p.m. UTC
Suppress warnings about fallthrough in a case statement where this
is intended.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/lib/rt-utils.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/src/lib/rt-utils.c b/src/lib/rt-utils.c
index 14dac5608037..6bbd25a8ba53 100644
--- a/src/lib/rt-utils.c
+++ b/src/lib/rt-utils.c
@@ -382,12 +382,15 @@  int parse_mem_string(char *str, uint64_t *val)
 	case 'g':
 	case 'G':
 		v *= 1024;
+		__attribute__ ((fallthrough));
 	case 'm':
 	case 'M':
 		v *= 1024;
+		__attribute__ ((fallthrough));
 	case 'k':
 	case 'K':
 		v *= 1024;
+		__attribute__ ((fallthrough));
 	case 'b':
 	case 'B':
 		break;