From: Magnus Jacobsson Date: Fri, 2 Oct 2020 12:23:00 +0000 (+0200) Subject: Show usage and exit non-zero for unsupported option in bcomps X-Git-Tag: 2.46.0~20^2^2~47^2~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=784f97fb47399f74876d8b922868311bcb9aa816;p=graphviz Show usage and exit non-zero for unsupported option in bcomps Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- diff --git a/cmd/tools/bcomps.c b/cmd/tools/bcomps.c index f1e9662d5..6e60b4fd6 100644 --- a/cmd/tools/bcomps.c +++ b/cmd/tools/bcomps.c @@ -360,9 +360,11 @@ static void init(int argc, char *argv[]) case '?': if (optopt == '?') usage(0); - else + else { fprintf(stderr, - "bcomps: option -%c unrecognized - ignored\n", optopt); + "bcomps: option -%c unrecognized\n", optopt); + usage(1); + } break; } }