[gnome-commander] Removes gcc warning about sign-compare
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Removes gcc warning about sign-compare
- Date: Fri, 28 Apr 2017 21:33:59 +0000 (UTC)
commit ea5fd83f44f4ce91235de18e801a6f5d5e60be1c
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]