From 64eb76eebb7e4f0363aca2c92fd6b1cc0ce8e7b0 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 31 Jul 2015 01:49:03 -0400 Subject: [PATCH] kauth: Resolve date signedness warning in SetFields MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk --- CODING | 2 +- src/kauth/Makefile.in | 1 - src/kauth/admin_tools.c | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CODING b/CODING index 1780b0ca5..8e1891d9e 100644 --- a/CODING +++ b/CODING @@ -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 diff --git a/src/kauth/Makefile.in b/src/kauth/Makefile.in index e0efbf66d..cffe8ea79 100644 --- a/src/kauth/Makefile.in +++ b/src/kauth/Makefile.in @@ -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} diff --git a/src/kauth/admin_tools.c b/src/kauth/admin_tools.c index 14706e906..9ec57062e 100644 --- a/src/kauth/admin_tools.c +++ b/src/kauth/admin_tools.c @@ -16,6 +16,10 @@ #include #include +#ifdef IGNORE_SOME_GCC_WARNINGS +# pragma GCC diagnostic warning "-Wstrict-prototypes" +#endif + #include #include #include @@ -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; -- 2.39.5