]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Removed warnings from gssd_proc.c
authorSteve Dickson <steved@redhat.com>
Tue, 20 Jul 2010 22:13:45 +0000 (18:13 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 9 Aug 2010 13:57:02 +0000 (09:57 -0400)
gssd_proc.c: In function 'create_auth_rpc_client':
gssd_proc.c:939: warning: comparison between signed and unsigned integer expressions
gssd_proc.c:939: warning: comparison between signed and unsigned integer expressions
gssd_proc.c: In function 'handle_krb5_upcall':
gssd_proc.c:1164: warning: comparison between signed and unsigned integer expressions
gssd_proc.c: In function 'handle_spkm3_upcall':
gssd_proc.c:1178: warning: comparison between signed and unsigned integer expressions

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/gssd_proc.c

index 3902b959240c2d237630a7b1e4f3d4016d9e4f75..c301d467d26c88e039570153deb7137bdf979aba 100644 (file)
@@ -936,7 +936,7 @@ int create_auth_rpc_client(struct clnt_info *clp,
        if (sec.cred != GSS_C_NO_CREDENTIAL)
                gss_release_cred(&min_stat, &sec.cred);
        /* Restore euid to original value */
-       if ((save_uid != -1) && (setfsuid(save_uid) != uid)) {
+       if (((int)save_uid != -1) && (setfsuid(save_uid) != (int)uid)) {
                printerr(0, "WARNING: Failed to restore fsuid"
                            " to uid %d from %d\n", save_uid, uid);
        }
@@ -1161,7 +1161,7 @@ handle_krb5_upcall(struct clnt_info *clp)
 {
        uid_t                   uid;
 
-       if (read(clp->krb5_fd, &uid, sizeof(uid)) < sizeof(uid)) {
+       if (read(clp->krb5_fd, &uid, sizeof(uid)) < (ssize_t)sizeof(uid)) {
                printerr(0, "WARNING: failed reading uid from krb5 "
                            "upcall pipe: %s\n", strerror(errno));
                return;
@@ -1175,7 +1175,7 @@ handle_spkm3_upcall(struct clnt_info *clp)
 {
        uid_t                   uid;
 
-       if (read(clp->spkm3_fd, &uid, sizeof(uid)) < sizeof(uid)) {
+       if (read(clp->spkm3_fd, &uid, sizeof(uid)) < (ssize_t)sizeof(uid)) {
                printerr(0, "WARNING: failed reading uid from spkm3 "
                         "upcall pipe: %s\n", strerror(errno));
                return;