Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1586371
| From | Jonathan Dieter <jdieter@lesbg.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 2/2] usbip: Fix implicit fallthrough warning |
| Date | 2017-02-22 19:20 +0100 |
| Message-ID | <tdJGa-5HP-25@gated-at.bofh.it> (permalink) |
| References | <tdy81-5ig-3@gated-at.bofh.it> <tdJG9-5HP-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
GCC 7 now warns when switch statements fall through implicitly, and with
-Werror enabled in configure.ac, that makes these tools unbuildable.
We fix this by notifying the compiler that this particular case statement
is meant to fall through.
Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
---
tools/usb/usbip/src/usbip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/usb/usbip/src/usbip.c b/tools/usb/usbip/src/usbip.c
index d7599d9..73d8eee 100644
--- a/tools/usb/usbip/src/usbip.c
+++ b/tools/usb/usbip/src/usbip.c
@@ -176,6 +176,8 @@ int main(int argc, char *argv[])
break;
case '?':
printf("usbip: invalid option\n");
+ /* Terminate after printing error */
+ /* FALLTHRU */
default:
usbip_usage();
goto out;
--
2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/2] usbip: Fix-format-overflow Jonathan Dieter <jdieter@lesbg.com> - 2017-02-21 19:00 +0100
Re: [PATCH v2 1/2] usbip: Fix-format-overflow Krzysztof Opasiak <k.opasiak@samsung.com> - 2017-02-22 07:00 +0100
[PATCH v3 1/2] usbip: Fix-format-overflow Jonathan Dieter <jdieter@lesbg.com> - 2017-02-22 19:20 +0100
[PATCH v3 2/2] usbip: Fix implicit fallthrough warning Jonathan Dieter <jdieter@lesbg.com> - 2017-02-22 19:20 +0100
[PATCH v4 1/2] usbip: Fix-format-overflow Jonathan Dieter <jdieter@lesbg.com> - 2017-02-27 10:00 +0100
[PATCH v4 2/2] usbip: Fix implicit fallthrough warning Jonathan Dieter <jdieter@lesbg.com> - 2017-02-27 10:00 +0100
Re: [PATCH v2 1/2] usbip: Fix-format-overflow Jonathan Dieter <jdieter@lesbg.com> - 2017-02-22 19:20 +0100
csiph-web