From f8a2329d8a24c0901d945986232267c02f080fc4 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 18 Aug 2022 18:52:40 -0700 Subject: send_axes: Mark switch statement fallthrough as intentional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quiets gcc warnings: XTest.c: In function ‘send_axes’: XTest.c:274:19: warning: this statement may fall through [-Wimplicit-fallthrough=] ev.valuator5 = *(axes+5); ~~~~~~~~~~~~~^~~~~~~~~~~ XTest.c:275:2: note: here case 5: ^~~~ XTest.c:276:19: warning: this statement may fall through [-Wimplicit-fallthrough=] ev.valuator4 = *(axes+4); ~~~~~~~~~~~~~^~~~~~~~~~~ XTest.c:277:2: note: here case 4: ^~~~ XTest.c:278:19: warning: this statement may fall through [-Wimplicit-fallthrough=] ev.valuator3 = *(axes+3); ~~~~~~~~~~~~~^~~~~~~~~~~ XTest.c:279:2: note: here case 3: ^~~~ XTest.c:280:19: warning: this statement may fall through [-Wimplicit-fallthrough=] ev.valuator2 = *(axes+2); ~~~~~~~~~~~~~^~~~~~~~~~~ XTest.c:281:2: note: here case 2: ^~~~ XTest.c:282:19: warning: this statement may fall through [-Wimplicit-fallthrough=] ev.valuator1 = *(axes+1); ~~~~~~~~~~~~~^~~~~~~~~~~ XTest.c:283:2: note: here case 1: ^~~~ Signed-off-by: Alan Coopersmith --- src/XTest.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/XTest.c b/src/XTest.c index 3e4bb17..e534ee4 100644 --- a/src/XTest.c +++ b/src/XTest.c @@ -272,14 +272,19 @@ send_axes( switch (n) { case 6: ev.valuator5 = *(axes+5); + /* fallthrough */ case 5: ev.valuator4 = *(axes+4); + /* fallthrough */ case 4: ev.valuator3 = *(axes+3); + /* fallthrough */ case 3: ev.valuator2 = *(axes+2); + /* fallthrough */ case 2: ev.valuator1 = *(axes+1); + /* fallthrough */ case 1: ev.valuator0 = *axes; } -- cgit v1.2.1