From 033585175485077bf7f5bbb352fd4f162d0c235f Mon Sep 17 00:00:00 2001 From: Kurt Roeckx Date: Sun, 14 Feb 2016 20:45:02 +0100 Subject: argv was set but unused Also gives an error message when you gave it a parameter it didn't expect. Reviewed-by: Rich Salz MR: #2009 --- apps/nseq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/nseq.c') diff --git a/apps/nseq.c b/apps/nseq.c index fd63bd8..4bc4f32 100644 --- a/apps/nseq.c +++ b/apps/nseq.c @@ -89,6 +89,7 @@ int nseq_main(int argc, char **argv) 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: @@ -107,7 +108,8 @@ int nseq_main(int argc, char **argv) } } argc = opt_num_rest(); - argv = opt_rest(); + if (argc != 0) + goto opthelp; in = bio_open_default(infile, 'r', FORMAT_PEM); if (in == NULL) -- cgit v1.1