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

index d6dcf25db24a4144a43107f7cefaa09265b845b9..459f705d8129532f170afef8be28f457a70cd195 100644 (file)
@@ -25,6 +25,7 @@
 #include    <string.h>
 #include    <cgraph/cgraph.h>
 #include    <cgraph/exit.h>
+#include    <cgraph/unreachable.h>
 #include    <ingraphs/ingraphs.h>
 
 #include <getopt.h>
@@ -188,6 +189,8 @@ static char **scanargs(int argc, char **argv)
                    cmd, optopt);
            usage(-1);
            break;
+       default:
+           UNREACHABLE();
        }
     }
     if (Do_fans && MaxMinlen < 1)