From 74d53f288c7eeecc36d4c082dd96d840f1861d7b Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 21 Jul 2009 20:26:34 +0100 Subject: [PATCH] PAG numbers are unsigned (and other warnings) PAG numbers are represented by afs_uint32. Fix assorted call sites to reflect this. While we're here, prototype ktc_newpag, and fix the casts used by the ktc_curpag() call. Reviewed-on: http://gerrit.openafs.org/167 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- src/afs/afs_osi_pag.c | 3 ++- src/afs/afs_pioctl.c | 2 +- src/auth/auth.p.h | 4 ++++ src/auth/ktc.c | 6 +++--- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/afs/afs_osi_pag.c b/src/afs/afs_osi_pag.c index 879cd1d09..3bc472396 100644 --- a/src/afs/afs_osi_pag.c +++ b/src/afs/afs_osi_pag.c @@ -407,7 +407,8 @@ int AddPag(afs_int32 aval, struct AFS_UCRED **credpp) #endif { - afs_int32 newpag, code; + afs_int32 code; + afs_uint32 newpag; AFS_STATCNT(AddPag); #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 622a4dd51..2ca6d09f2 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -1551,7 +1551,7 @@ DECL_PIOCTL(PSetTokens) i = tcell->cellNum; afs_PutCell(tcell, READ_LOCK); if (set_parent_pag) { - afs_int32 pag; + afs_uint32 pag; #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) #if defined(AFS_DARWIN_ENV) struct proc *p = current_proc(); /* XXX */ diff --git a/src/auth/auth.p.h b/src/auth/auth.p.h index 6c00bc87a..a1b40feae 100644 --- a/src/auth/auth.p.h +++ b/src/auth/auth.p.h @@ -33,6 +33,10 @@ int ktc_ForgetToken(struct ktc_principal *); int ktc_ForgetAllTokens(void); afs_uint32 ktc_curpag(void); +#ifdef AFS_KERBEROS_ENV +int ktc_newpag(void); +#endif + #ifdef AFS_NT40_ENV /* Flags for the flag word sent along with a token */ diff --git a/src/auth/ktc.c b/src/auth/ktc.c index 3cba192bb..617c058c5 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -928,13 +928,13 @@ ktc_curpag(void) { int code; struct ViceIoctl iob; - afs_int32 pag; + afs_uint32 pag; /* now setup for the pioctl */ iob.in = NULL; iob.in_size = 0; - iob.out = &pag; - iob.out_size = sizeof(afs_int32); + iob.out = (caddr_t) &pag; + iob.out_size = sizeof(afs_uint32); code = PIOCTL(0, VIOC_GETPAG, &iob, 0); if (code < 0) { -- 2.39.5