From: Caleb Sander Mateos Date: Tue, 16 Jul 2024 16:21:04 +0000 (-0600) Subject: util: remove empty default case in argconfig functions X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2a68afc5f2b4c3f05f484f164e566fe22ee9413e;p=users%2Fsagi%2Fnvme-cli.git util: remove empty default case in argconfig functions Both argconfig_parse_type() and argconfig_set_opt_val() switch on the argument value type and have an empty default case. This is unnecessary and masks errors from unhandled enum values. So drop the default cases. Signed-off-by: Caleb Sander Mateos --- diff --git a/util/argconfig.c b/util/argconfig.c index f4805087..faa20fa7 100644 --- a/util/argconfig.c +++ b/util/argconfig.c @@ -208,8 +208,6 @@ static int argconfig_parse_type(struct argconfig_commandline_options *s, struct case CFG_FLAG: *(bool *)value = true; break; - default: - break; } return ret; @@ -267,8 +265,6 @@ static void argconfig_set_opt_val(enum argconfig_types type, union argconfig_val case CFG_STRING: *(char **)val = opt_val->string; break; - default: - break; } }