In ure.c, though k is a short, the literal 1 is of type 'int', and
so the operation 'k + 1' is performed at the (32-bit) width of int,
and therefore the "%d" format string is correct.
In accept_sec_context.c, the 'length' field of krb5_data is an
unsigned type, so checking for a negative value has no effect.
In net-server.c, the helper routine rtm_type_name() is only used
in code that is disabled with #if 0 conditionals; make the
definition also disabled in the same way to avoid warnings of an
unused function.
In kdc_authdata.c, equality checks in double parentheses elicit
a warning from clang. The double-parentheses idiom is normally used
to indicate that an assignment is being performed, but the value of
the assignment is also to be used as the value for the conditional.
Since assignment and equality checking differ only by a single
character, clang considers this worthy of a warning. Since the extra
set of parentheses is redundant and against style, it is correct to
remove them.
In several places (sim_server.c, dump.c, kdb5_destroy.c,
ovsec_kadmd.c), there are declarations of extern variables relating
to getopt() functionality that are now unused in the code. Remove
these unused variables.
struct sockaddr_in c_sock; /* client's address */
char full_hname[MAXHOSTNAMELEN];
char *cp;
- extern int opterr, optind;
extern char * optarg;
int ch;
* Parse command line arguments
*
*/
- opterr = 0;
while ((ch = getopt(argc, argv, "p:s:S:")) != -1) {
switch (ch) {
case 'p':
{
krb5_error_code ret;
FILE *f = NULL;
- extern char *optarg;
- extern int optind;
char *dumpfile = NULL, *dbname, buf[BUFSIZ];
dump_version *load = NULL;
int aindex;
int argc;
char *argv[];
{
- extern char *optarg;
extern int optind;
int optchar;
char *dbname;
int main(int argc, char *argv[])
{
- extern char *optarg;
- extern int optind, opterr;
int ret;
OM_uint32 OMret, major_status, minor_status;
char *whoami;
void *pctx = NULL;
ftable = authdata_plugins_ftables_v2[i];
- if ((ftable->authdata_proc == NULL)) {
+ if (ftable->authdata_proc == NULL) {
continue;
}
server_init_proc = ftable->init_proc;
void *pctx = NULL;
ftable = authdata_plugins_ftables_v0[i];
- if ((ftable->authdata_proc == NULL)) {
+ if (ftable->authdata_proc == NULL) {
continue;
}
server_init_proc = ftable->init_proc;
#ifdef HAVE_STRUCT_RT_MSGHDR
#include <net/route.h>
+#if 0
static char *
rtm_type_name(int type)
{
default: return "?";
}
}
+#endif
static void
do_network_reconfig(verto_ctx *ctx, verto_ev *ev)
TREAD_INT16(ptr, option.length, 0);
i -= 4;
- if (i < option.length || option.length < 0) {
+ if (i < option.length) {
code = KG_BAD_LENGTH;
major_status = GSS_S_FAILURE;
goto fail;
if (sym->props & (1 << k)) {
if (h != 0)
putc(',', out);
- fprintf(out, "%hd", k + 1);
+ fprintf(out, "%d", k + 1);
h = 1;
}
}