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

index 2421a48be455d2d82470437ecb610a3666ad2f69..fa6efb1519cca0a9436f28fe5aa73645ba27136a 100644 (file)
@@ -28,6 +28,7 @@
 #include <cgraph/exit.h>
 #include <cgraph/strview.h>
 #include <cgraph/tokenize.h>
+#include <cgraph/unreachable.h>
 #include <common/types.h>
 #include <common/utils.h>
 #include <ctype.h>
@@ -690,6 +691,8 @@ static void initargs(int argc, char **argv)
                usage(1);
            }
            break;
+       default:
+           UNREACHABLE();
        }
     }