From: Magnus Jacobsson Date: Fri, 2 Oct 2020 12:26:09 +0000 (+0200) Subject: Show usage and exit non-zero for unsupported option in ccomps X-Git-Tag: 2.46.0~20^2^2~47^2~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74bbafefd2945e17b917283ed3aa0e9b7e3d3869;p=graphviz Show usage and exit non-zero for unsupported option in ccomps Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- diff --git a/cmd/tools/ccomps.c b/cmd/tools/ccomps.c index 4fded3dd2..8cedc8a66 100644 --- a/cmd/tools/ccomps.c +++ b/cmd/tools/ccomps.c @@ -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; } }