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

index a860f2ee1bb47d1a4a0e446ee8421828230a4b44..5ac9bd5eb100458cebeccb9f009fbabbad060e37 100644 (file)
@@ -26,6 +26,7 @@
 #include <cgraph/cgraph.h>
 #include <cgraph/stack.h>
 #include <cgraph/exit.h>
+#include <cgraph/unreachable.h>
 #include <common/arith.h>
 #include <common/types.h>
 #include <common/utils.h>
@@ -210,6 +211,8 @@ static void init(int argc, char *argv[])
                usage(1);
            }
            break;
+       default:
+           UNREACHABLE();
        }
     }
     argv += optind;