From: Andrew Deason Date: Thu, 22 Dec 2011 18:50:53 +0000 (-0500) Subject: klog.krb5: cast get_cred_keylen to unsigned X-Git-Tag: upstream/1.8.0_pre1^2~2902 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2d8fa26022e6a9aac1877d0b6b73a3b1922a2674;p=packages%2Fo%2Fopenafs.git klog.krb5: cast get_cred_keylen to unsigned get_cred_keylen can yield a type besides an unsigned int (such as a size_t on heimdal). But we are printing it with %u, which causes a warning, so cast it to an unsigned int. Change-Id: I7b89de5b0b163b9532ac347e9c56e865cb58f266 Reviewed-on: http://gerrit.openafs.org/6410 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/aklog/klog.c b/src/aklog/klog.c index 201eef8ce..2f7949e87 100644 --- a/src/aklog/klog.c +++ b/src/aklog/klog.c @@ -683,7 +683,7 @@ CommandProc(struct cmd_syndesc *as, void *arock) if (get_cred_keylen(afscred) != sizeof(atoken->sessionKey)) { afs_com_err(rn, 0, "Invalid rxkad key length (%u != 8) key type (%u)", - get_cred_keylen(afscred), + (unsigned)get_cred_keylen(afscred), get_creds_enctype(afscred)); KLOGEXIT(1); }