[gnome-commander/ConvertWarningsToErrors] gnome-cmd-file.cc: fix for -Wsign-compare part 2



commit b04ba203d5cbd928bec5daddff9e473164310264
Author: Mamoru TASAKA <mtasaka fedoraproject org>
Date:   Sun Apr 23 16:40:37 2017 +0900

    gnome-cmd-file.cc: fix for -Wsign-compare part 2
    
    src/gnome-cmd-file.cc:284:13: error: comparison between signed and unsigned integer expressions 
[-Werror=sign-compare]
         if (uid != -1)
    
    uid = -1 is assigned at src/dialogs/gnome-cmd-chown-dialog.cc:on_ok(). Just cast for now

 src/gnome-cmd-file.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index d48076b..0952dc8 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -281,7 +281,7 @@ GnomeVFSResult GnomeCmdFile::chown(uid_t uid, gid_t gid)
 {
     g_return_val_if_fail (info != NULL, GNOME_VFS_ERROR_CORRUPTED_DATA);
 
-    if (uid != -1)
+    if (uid != (uid_t)-1)
         info->uid = uid;
     info->gid = gid;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]