]> granicus.if.org Git - graphviz/commitdiff
graphml2gv initargs: 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/graphml2gv.c

index ed34cd9b7b4e54b1455ec40db4bfcb23d00b61f6..7b11ef8064be8a0846e8a0119f1210051b521a0b 100644 (file)
@@ -19,6 +19,7 @@
 #include    <cgraph/exit.h>
 #include    <cgraph/likely.h>
 #include    <cgraph/stack.h>
+#include    <cgraph/unreachable.h>
 #include    <getopt.h>
 #include    <stdio.h>
 #include    <string.h>
@@ -465,6 +466,9 @@ static void initargs(int argc, char **argv)
                        optopt);
                usage(1);
            }
+           break;
+       default:
+           UNREACHABLE();
        }
     }