projects
/
platform
/
upstream
/
gflags.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a69b254
)
Fix unsigned comparison error in gflags_reporting.cc (#168)
author
Aaryaman Sagar
<aary@users.noreply.github.com>
Wed, 24 Aug 2016 17:03:08 +0000
(13:03 -0400)
committer
Andreas Schuh
<andreas.schuh.84@gmail.com>
Wed, 24 Aug 2016 17:03:08 +0000
(18:03 +0100)
src/gflags_reporting.cc
patch
|
blob
|
history
diff --git
a/src/gflags_reporting.cc
b/src/gflags_reporting.cc
index
9cc41a7
..
fb17059
100644
(file)
--- 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