]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usbip: Fix implicit fallthrough warning
authorJonathan Dieter <jdieter@lesbg.com>
Mon, 27 Feb 2017 08:31:04 +0000 (10:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2017 04:16:56 +0000 (13:16 +0900)
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>
tools/usb/usbip/src/usbip.c

index d7599d9435298286d63642067144c280c6110002..73d8eee8130b3db2121849dead5b7c064b0247c6 100644 (file)
@@ -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;