projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add -Wswitch-enum
[openssl.git]
/
apps
/
openssl.c
diff --git
a/apps/openssl.c
b/apps/openssl.c
index 4f4175c4a0261c813f177867984a31314245703e..fceb458542a6685db73d485aa5d6483ab5960f79 100644
(file)
--- a/
apps/openssl.c
+++ b/
apps/openssl.c
@@
-393,26
+393,32
@@
int list_main(int argc, char **argv)
return 0;
}
return 0;
}
+typedef enum HELP_CHOICE {
+ OPT_hERR = -1, OPT_hEOF = 0, OPT_hHELP
+} HELP_CHOICE;
+
OPTIONS help_options[] = {
OPTIONS help_options[] = {
- {"help", OPT_HELP, '-', "Display this summary"},
+ {"help", OPT_
h
HELP, '-', "Display this summary"},
{NULL}
};
{NULL}
};
+
int help_main(int argc, char **argv)
{
FUNCTION *fp;
int i, nl;
FUNC_TYPE tp;
char *prog;
int help_main(int argc, char **argv)
{
FUNCTION *fp;
int i, nl;
FUNC_TYPE tp;
char *prog;
- HELP
LIST
_CHOICE o;
+ HELP_CHOICE o;
prog = opt_init(argc, argv, help_options);
prog = opt_init(argc, argv, help_options);
- while ((o = opt_next()) != OPT_EOF) {
+ while ((o = opt_next()) != OPT_
h
EOF) {
switch (o) {
switch (o) {
- default:
+ case OPT_hERR:
+ case OPT_hEOF:
BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
return 1;
BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
return 1;
- case OPT_HELP:
+ case OPT_
h
HELP:
opt_help(help_options);
return 0;
}
opt_help(help_options);
return 0;
}