kauth: Resolve date signedness warning in SetFields

Resolves this warning:

admin_tools.c: In function ‘SetFields’:
admin_tools.c:611:30: warning: pointer targets in passing argument 2 of ‘ktime_DateToInt32’ differ in signedness [-Wpointer-sign]
  code = ktime_DateToInt32(s, &expiration);
                              ^
In file included from /home/anders/wd/openafs/include/afs/afsutil.h:84:0,
                 from admin_tools.c:39:
/home/anders/wd/openafs/include/afs/afsutil_prototypes.h:101:18: note: expected ‘afs_int32 *’ but argument is of type ‘afs_uint32 *’
 extern afs_int32 ktime_DateToInt32(char *adate, afs_int32 * aint32);
                  ^

Change-Id: Id24e7a6cd1ab2291c0c05d3835f4ad7fddfec8d7
Reviewed-on: http://gerrit.openafs.org/11956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
Anders Kaseorg 2015-07-31 01:49:03 -04:00 committed by Benjamin Kaduk
parent fa8e0beb96
commit 64eb76eebb
3 changed files with 6 additions and 3 deletions

2
CODING
View File

@ -255,7 +255,7 @@ bucoord/commands.c : all : Ubik_Call
: signed vs unsigned for dates
butc/tcudbprocs.c : all : ubik_Call
external/heimdal/hcrypto/validate.c: all: statement with empty body
kauth/admin_tools.c : all : signed vs unsigned for dates
kauth/admin_tools.c : strict-proto : ubik_Call
kauth/authclient.c : strict-proto : ubik_Call nonsense
libadmin/kas/afs_kasAdmin.c: strict-proto : ubik_Call nonsense
libadmin/samples/rxstat_query_peer.c : all : util_RPCStatsStateGet types

View File

@ -185,7 +185,6 @@ libkauth.krb.a: $(KRB_objs)
kas.o: kas.c ${INCLS} AFS_component_version_number.o
CFLAGS_admin_tools.o= @CFLAGS_NOERROR@
admin_tools.o: admin_tools.c ${INCLS} kaport.h
kkids.o: kkids.c ${INCLS}

View File

@ -16,6 +16,10 @@
#include <afs/param.h>
#include <afs/stds.h>
#ifdef IGNORE_SOME_GCC_WARNINGS
# pragma GCC diagnostic warning "-Wstrict-prototypes"
#endif
#include <roken.h>
#include <afs/opr.h>
#include <afs/opr_assert.h>
@ -581,7 +585,7 @@ SetFields(struct cmd_syndesc *as, void *arock)
char instance[MAXKTCNAMELEN];
char *end;
afs_int32 flags = 0;
Date expiration = 0;
afs_int32 expiration = 0;
afs_int32 lifetime = 0;
afs_int32 maxAssociates = -1;
afs_int32 pwexpiry = 0;