]> granicus.if.org Git - graphviz/commitdiff
Show usage and exit non-zero for unsupported option in ccomps
authorMagnus Jacobsson <magnus.jacobsson@berotec.se>
Fri, 2 Oct 2020 12:26:09 +0000 (14:26 +0200)
committerMagnus Jacobsson <magnus.jacobsson@berotec.se>
Thu, 8 Oct 2020 19:10:24 +0000 (21:10 +0200)
Towards https://gitlab.com/graphviz/graphviz/-/issues/1843.

cmd/tools/ccomps.c

index 4fded3dd23788cc30c98c9eddc35cad51757c39a..8cedc8a6692f1383151696c0f33fa75130577c9a 100644 (file)
@@ -207,9 +207,11 @@ static void init(int argc, char *argv[])
        case '?':
            if (optopt == '?')
                usage(0);
-           else
+           else {
                fprintf(stderr,
-                       "ccomps: option -%c unrecognized - ignored\n", optopt);
+                       "ccomps: option -%c unrecognized\n", optopt);
+                usage(1);
+           }
            break;
        }
     }