[gnome-commander] gnome-cmd-file.cc: fix for -Wsign-compare part 1



commit 1cf3e2c7c401a1df86422a35545ded61ffb6232b
Author: Mamoru TASAKA <mtasaka fedoraproject org>
Date:   Sun Apr 23 16:31:02 2017 +0900

    gnome-cmd-file.cc: fix for -Wsign-compare part 1
    
    src/gnome-cmd-file.cc:541:25: error: comparison between signed and unsigned integer expressions 
[-Werror=sign-compare]
         if (priv->tree_size != -1)
    
    tree_size has type GnomeVFSFileSize and line 91 actually has:  f->priv->tree_size = -1;

 src/gnome-cmd-file.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 2162500..d48076b 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -538,7 +538,7 @@ GnomeVFSFileSize GnomeCmdFile::get_tree_size()
     if (is_dotdot)
         return 0;
 
-    if (priv->tree_size != -1)
+    if (priv->tree_size != (GnomeVFSFileSize)-1)
         return priv->tree_size;
 
     GnomeVFSURI *uri = get_uri();
@@ -911,5 +911,5 @@ void GnomeCmdFile::invalidate_tree_size()
 
 gboolean GnomeCmdFile::has_tree_size()
 {
-    return priv->tree_size != -1;
+    return priv->tree_size != (GnomeVFSFileSize)-1;
 }


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