From 1fdfe2314ce69dda30b7e89b4788f4563725de0a Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 3 Oct 2020 16:03:13 +0200 Subject: [PATCH] Show usage and exit non-zero for unsupported option in smyrna Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- cmd/smyrna/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/smyrna/main.c b/cmd/smyrna/main.c index 13d952887..1a34b0f52 100644 --- a/cmd/smyrna/main.c +++ b/cmd/smyrna/main.c @@ -136,10 +136,12 @@ static char *parseArgs(int argc, char *argv[], ViewInfo * view) case '?': if (optopt == '\0') usage(0); - else + else { fprintf(stderr, - "smyrna: option -%c unrecognized - ignored\n", + "smyrna: option -%c unrecognized\n", optopt); + usage(1); + } break; } } -- 2.40.0