]> granicus.if.org Git - graphviz/commitdiff
sccmap scanArgs: squash -Wswitch-default warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 15 Jan 2023 17:51:26 +0000 (09:51 -0800)
The default case is unreachable due to the preceding `getopt` call.

cmd/tools/sccmap.c

index 2387bb3ce9db68ac3530961ed22c48eb87232cad..9e69c7e834a805b30c08d53c80626e24ea3299b4 100644 (file)
@@ -32,6 +32,7 @@
 #include <cgraph/cgraph.h>
 #include <cgraph/exit.h>
 #include <cgraph/stack.h>
+#include <cgraph/unreachable.h>
 #include <ingraphs/ingraphs.h>
 
 #include <getopt.h>
@@ -302,6 +303,8 @@ static void scanArgs(int argc, char **argv)
                usage(1);
            }
            break;
+       default:
+           UNREACHABLE();
        }
     }
     argv += optind;