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

index fb3c573b2b6e256bd2e6744d1c17a1c420236351..8312121a192d299eb6c9f704b4e6ad6a20f223e7 100644 (file)
@@ -33,6 +33,7 @@
 #include <cgraph/cgraph.h>
 #include <cgraph/exit.h>
 #include <cgraph/stack.h>
+#include <cgraph/unreachable.h>
 
 typedef struct {
     Agrec_t h;
@@ -341,6 +342,8 @@ static void init(int argc, char *argv[])
                usage(1);
            }
            break;
+       default:
+           UNREACHABLE();
        }
     }
     argv += optind;