[gnome-commander/ConvertWarningsToErrors] Removes gcc warning about sign-compare



commit 1a220a71675af9d04a63f61e5033af40f8a8d3e5
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun Apr 16 20:53:57 2017 +0200

    Removes gcc warning about sign-compare

 src/tags/gnome-cmd-tags.cc |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/tags/gnome-cmd-tags.cc b/src/tags/gnome-cmd-tags.cc
index a86e212..60d2c01 100644
--- a/src/tags/gnome-cmd-tags.cc
+++ b/src/tags/gnome-cmd-tags.cc
@@ -92,8 +92,12 @@ void GnomeCmdFileMetadata::addf(const GnomeCmdTag tag, const gchar *fmt, ...)
         va_end (args);
 
         // If that worked, return the string
-        if (n > -1 && n < buff.size())
-          break;
+        if (n > -1)
+        {
+            guint letters = n;
+            if (letters < buff.size())
+                break;
+        }
 
         buff.resize(n > -1 ? n+1 : buff.size()*2);
     }


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