summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaryaman Sagar <aary@users.noreply.github.com>2016-08-24 13:03:08 -0400
committerAndreas Schuh <andreas.schuh.84@gmail.com>2016-08-24 18:03:08 +0100
commit7d31c02de8345d0a12010a0c1c8ebae37898f10e (patch)
treeea1ee4bd951b7de7c18051b0941c5ccea1f2d20a
parenta69b2544d613b4bee404988710503720c487119a (diff)
downloadgflags-7d31c02de8345d0a12010a0c1c8ebae37898f10e.tar.gz
gflags-7d31c02de8345d0a12010a0c1c8ebae37898f10e.tar.bz2
gflags-7d31c02de8345d0a12010a0c1c8ebae37898f10e.zip
Fix unsigned comparison error in gflags_reporting.cc (#168)
-rw-r--r--src/gflags_reporting.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gflags_reporting.cc b/src/gflags_reporting.cc
index 9cc41a7..fb17059 100644
--- a/src/gflags_reporting.cc
+++ b/src/gflags_reporting.cc
@@ -126,7 +126,8 @@ string DescribeOneFlag(const CommandLineFlagInfo& flag) {
string final_string = "";
int chars_in_line = 0; // how many chars in current line so far?
while (1) {
- assert(chars_left == strlen(c_string)); // Unless there's a \0 in there?
+ assert(static_cast<size_t>(chars_left)
+ == strlen(c_string)); // Unless there's a \0 in there?
const char* newline = strchr(c_string, '\n');
if (newline == NULL && chars_in_line+chars_left < kLineLength) {
// The whole remainder of the string fits on this line