wok-current view linux/stuff/linux-usbip-fix-implicit-fallthrough-gcc8.patch @ rev 25586

Fix linux build with gcc > 6 again
author Stanislas Leduc <shann@slitaz.org>
date Mon May 29 12:23:26 2023 +0000 (13 months ago)
parents
children
line source
1 GCC 7 now warns when switch statements fall through implicitly, and with
2 -Werror enabled in configure.ac, that makes these tools unbuildable.
4 We fix this by notifying the compiler that this particular case statement
5 is meant to fall through.
7 Reviewed-by: Peter Senna Tschudin <peter.senna@xxxxxxxxx>
8 Signed-off-by: Jonathan Dieter <jdieter@xxxxxxxxx>
9 ---
10 tools/usb/usbip/src/usbip.c | 2 ++
11 1 file changed, 2 insertions(+)
13 diff --git a/tools/usb/usbip/src/usbip.c b/tools/usb/usbip/src/usbip.c
14 index d7599d9..73d8eee 100644
15 --- a/drivers/staging/usbip/userspace/src/usbip.c
16 +++ b/drivers/staging/usbip/userspace/src/usbip.c
17 @@ -176,6 +176,8 @@ int main(int argc, char *argv[])
18 break;
19 case '?':
20 printf("usbip: invalid option\n");
21 + /* Terminate after printing error */
22 + /* FALLTHRU */
23 default:
24 usbip_usage();
25 goto out;