Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
We turn on a few extra warnings and fix the fallout that occurs when building with --enable-developer. Note that we get different warnings on different machines and so this will be a work in progress. So far, we have built on NetBSD/amd64 5.99.64 (which uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3). Notably, we fixed 1. a lot of missing structure initialisers, 2. unchecked return values for functions that glibc marks as __attribute__((warn-unused-result)), 3. made minor modifications to slc and asn1_compile which can generate code which generates warnings, and 4. a few stragglers here and there. We turned off the extended warnings for many programs in appl/ as they are nearing the end of their useful lifetime, e.g. rsh, rcp, popper, ftp and telnet. Interestingly, glibc's strncmp() macro needed to be worked around whereas the function calls did not. We have not yet tried this on 32 bit platforms, so there will be a few more warnings when we do.
This commit is contained in:
@@ -46,16 +46,16 @@ static int version_flag;
|
||||
static int help_flag;
|
||||
|
||||
struct getargs args[] = {
|
||||
{ "list", 'l', arg_flag, &listp, "list OTP status" },
|
||||
{ "delete", 'd', arg_flag, &deletep, "delete OTP" },
|
||||
{ "open", 'o', arg_flag, &openp, "open a locked OTP" },
|
||||
{ "renew", 'r', arg_flag, &renewp, "securely renew OTP" },
|
||||
{ "list", 'l', arg_flag, &listp, "list OTP status", NULL },
|
||||
{ "delete", 'd', arg_flag, &deletep, "delete OTP", NULL },
|
||||
{ "open", 'o', arg_flag, &openp, "open a locked OTP", NULL },
|
||||
{ "renew", 'r', arg_flag, &renewp, "securely renew OTP", NULL },
|
||||
{ "hash", 'f', arg_string, &alg_string,
|
||||
"hash algorithm (md4, md5, or sha)", "algorithm"},
|
||||
{ "user", 'u', arg_string, &user,
|
||||
"user other than current user (root only)", "user" },
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 'h', arg_flag, &help_flag }
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 'h', arg_flag, &help_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
@@ -44,13 +44,14 @@ static int version_flag;
|
||||
static int help_flag;
|
||||
|
||||
struct getargs args[] = {
|
||||
{ "extended", 'e', arg_flag, &extendedp, "print keys in extended format" },
|
||||
{ "count", 'n', arg_integer, &count, "number of keys to print" },
|
||||
{ "hexadecimal", 'h', arg_flag, &hexp, "output in hexadecimal" },
|
||||
{ "extended", 'e', arg_flag, &extendedp, "print keys in extended format",
|
||||
NULL },
|
||||
{ "count", 'n', arg_integer, &count, "number of keys to print", NULL },
|
||||
{ "hexadecimal", 'h', arg_flag, &hexp, "output in hexadecimal", NULL },
|
||||
{ "hash", 'f', arg_string, &alg_string,
|
||||
"hash algorithm (md4, md5, or sha)", "algorithm"},
|
||||
{ "version", 0, arg_flag, &version_flag },
|
||||
{ "help", 0, arg_flag, &help_flag }
|
||||
{ "version", 0, arg_flag, &version_flag, NULL, NULL },
|
||||
{ "help", 0, arg_flag, &help_flag, NULL, NULL }
|
||||
};
|
||||
|
||||
int num_args = sizeof(args) / sizeof(args[0]);
|
||||
|
Reference in New Issue
Block a user