Skip to content

Commit f1469e5

Browse files
Input: Fix fall-through warning for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough; statement. Notice that this seems to be a Duff device for performance[1]. So, although the code looks a bit _funny_, I didn't want to refactor or modify it beyond merely adding a fallthrough marking, which might be the least disruptive way to fix this issue. [1] https://www.drdobbs.com/a-reusable-duff-device/184406208 Link: KSPP#115 Signed-off-by: Gustavo A. R. Silva <[email protected]>
1 parent 4e1c8c1 commit f1469e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/input/joystick/sidewinder.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv)
660660
fallthrough;
661661
case 45: /* Ambiguous packet length */
662662
if (j <= 40) { /* ID length less or eq 40 -> FSP */
663+
fallthrough;
663664
case 43:
664665
sw->type = SW_ID_FSP;
665666
break;

0 commit comments

Comments
 (0)