From: Norbert Pocs Date: Wed, 14 May 2025 12:53:31 +0000 (+0200) Subject: configutl.c: Remove dead code X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=677ded7547351bc3b1b6f72745e84b1287402ffb;p=thirdparty%2Fopenssl.git configutl.c: Remove dead code Resolve coverity issue 1646848, 1646847 Signed-off-by: Norbert Pocs Reviewed-by: Saša Nedvědický Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27623) --- diff --git a/apps/configutl.c b/apps/configutl.c index 9c6a2518c2a..81bcf9d7895 100644 --- a/apps/configutl.c +++ b/apps/configutl.c @@ -111,7 +111,6 @@ int configutl_main(int argc, char *argv[]) int ret = 1; char *prog, *configfile = NULL; OPTION_CHOICE o; - int dump = 1; CONF *cnf = NULL; long eline = 0; int default_section_idx, idx; @@ -123,11 +122,6 @@ int configutl_main(int argc, char *argv[]) prog = opt_init(argc, argv, configutl_options); while ((o = opt_next()) != OPT_EOF) { switch (o) { - case OPT_EOF: - case OPT_ERR: - opthelp: - BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); - goto end; case OPT_HELP: opt_help(configutl_options); ret = 0; @@ -142,12 +136,16 @@ int configutl_main(int argc, char *argv[]) case OPT_OUT: outfile = opt_arg(); break; + case OPT_ERR: + /* + * default needed for OPT_EOF which might never happen. + */ + default: + BIO_printf(bio_err, "%s: Use -help for summary.\n", prog); + goto end; } } - if (dump == 0) - goto opthelp; - out = bio_open_default(outfile, 'w', FORMAT_TEXT); if (out == NULL) goto end;