klog.krb5: cast get_cred_keylen to unsigned
authorAndrew Deason <adeason@sinenomine.net>
Thu, 22 Dec 2011 18:50:53 +0000 (13:50 -0500)
committerDerrick Brashear <shadow@dementix.org>
Tue, 27 Dec 2011 04:27:05 +0000 (20:27 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/aklog/klog.c

index 201eef8..2f7949e 100644 (file)
@@ -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);
         }