From 200b6536e13b41a6fed72c0ca4f364f270bfe382 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 2 Nov 2021 10:57:04 +0000 Subject: [PATCH] fatalx on unknown enum members in a couple of places, from Ben Boeckel. --- arguments.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arguments.c b/arguments.c index 985aadc0..17bc12ec 100644 --- a/arguments.c +++ b/arguments.c @@ -108,6 +108,7 @@ args_value_as_string(struct args_value *value) case ARGS_STRING: return (value->string); } + fatalx("unexpected argument type"); } /* Create an empty arguments set. */ @@ -753,6 +754,7 @@ args_make_commands(struct args_command_state *state, int argc, char **argv, case CMD_PARSE_SUCCESS: return (pr->cmdlist); } + fatalx("invalid parse return state"); } /* Free commands state. */