summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-18 18:52:40 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-18 18:52:40 -0700
commitf8a2329d8a24c0901d945986232267c02f080fc4 (patch)
tree9b6010499921d00c404b75a50ef8f6d46f888ef7
parent80c35fd74d99039949be2522f18f4040e2f6eec3 (diff)
downloadxorg-lib-libXtst-f8a2329d8a24c0901d945986232267c02f080fc4.tar.gz
send_axes: Mark switch statement fallthrough as intentional
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 <alan.coopersmith@oracle.com>
-rw-r--r--src/XTest.c5
1 files changed, 5 insertions, 0 deletions
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;
}