From e6035c8f6c98cbdbd4305a3ab70fe1a4034325bd Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 3 Oct 2020 16:04:22 +0200 Subject: [PATCH] Show usage and exit non-zero for unsupported option in sccmap Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- doc/libgraph/sccmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/libgraph/sccmap.c b/doc/libgraph/sccmap.c index 6808462b6..0c37efc2e 100644 --- a/doc/libgraph/sccmap.c +++ b/doc/libgraph/sccmap.c @@ -313,9 +313,11 @@ static void scanArgs(int argc, char **argv) case '?': if (optopt == '?') usage(0); - else - fprintf(stderr, "%s: option -%c unrecognized - ignored\n", + else { + fprintf(stderr, "%s: option -%c unrecognized\n", CmdName, optopt); + usage(1); + } break; } } -- 2.40.0