stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.9] usbip: Fix implicit fallthrough warning
@ 2018-01-24  2:32 Shuah Khan
  2018-01-24  2:32 ` [PATCH 4.9] usbip: Fix potential format overflow in userspace tools Shuah Khan
  2018-01-24  9:11 ` [PATCH 4.9] usbip: Fix implicit fallthrough warning Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Shuah Khan @ 2018-01-24  2:32 UTC (permalink / raw)
  To: valentina.manea.m, shuah, gregkh, jdieter
  Cc: peter.senna, linux-usb, linux-kernel, stable, Shuah Khan

From: Jonathan Dieter <jdieter@lesbg.com>

Upstream commit cfd6ed4537a9 ("usbip: Fix implicit fallthrough warning")

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.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 d7599d943529..73d8eee8130b 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.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-24  9:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-24  2:32 [PATCH 4.9] usbip: Fix implicit fallthrough warning Shuah Khan
2018-01-24  2:32 ` [PATCH 4.9] usbip: Fix potential format overflow in userspace tools Shuah Khan
2018-01-24  9:11 ` [PATCH 4.9] usbip: Fix implicit fallthrough warning Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).