From fd90061c24d2a36452b8fe6aeb636faab6b2bb8f Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 31 Aug 2016 13:23:44 +0200 Subject: [PATCH] Make argument parsing errors fatal When you run "awesome --foobar", a warning will be printed (by getopt_long()) and awesome just ignores the invalid argument. That's unusual and weird. This commit produces an error instead. Signed-off-by: Uli Schlachter --- awesome.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awesome.c b/awesome.c index ef5d18f6..8e8d5dde 100644 --- a/awesome.c +++ b/awesome.c @@ -524,6 +524,9 @@ main(int argc, char **argv) case 'r': replace_wm = true; break; + default: + exit_help(EXIT_FAILURE); + break; } /* Get XDG basedir data */