From: Magnus Jacobsson Date: Sat, 3 Oct 2020 14:06:06 +0000 (+0200) Subject: Show usage and exit non-zero for unsupported option in lib/spine/spine.c X-Git-Tag: 2.46.0~20^2^2~47^2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c77829b1f113e329fd539c220015319360139f9;p=graphviz Show usage and exit non-zero for unsupported option in lib/spine/spine.c Final commit that fixes https://gitlab.com/graphviz/graphviz/-/issues/1843. --- diff --git a/lib/spine/spine.c b/lib/spine/spine.c index c1b023fb4..791dc4580 100644 --- a/lib/spine/spine.c +++ b/lib/spine/spine.c @@ -634,9 +634,11 @@ static void doOpts(int argc, char *argv[], opts_t * op) case '?': if (optopt == '?') usage(cmd, 0); - else - fprintf(stderr, "%s: option -%c unrecognized - ignored\n", + else { + fprintf(stderr, "%s: option -%c unrecognized\n", cmd, optopt); + usage(cmd, 1); + } break; default: break;