From 784f97fb47399f74876d8b922868311bcb9aa816 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Fri, 2 Oct 2020 14:23:00 +0200 Subject: [PATCH] Show usage and exit non-zero for unsupported option in bcomps Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- cmd/tools/bcomps.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } } -- 2.40.0