From 1bfbbdef7cc71ae7655ccea071f78d1bb066ae6c Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Fri, 2 Oct 2020 15:20:52 +0200 Subject: [PATCH] Show usage and exit non-zero for unsupported option in sccmap Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- cmd/tools/sccmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/tools/sccmap.c b/cmd/tools/sccmap.c index 6918bf299..6de217b62 100644 --- a/cmd/tools/sccmap.c +++ b/cmd/tools/sccmap.c @@ -365,9 +365,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