aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Brianceau <jbriance@cisco.com>2016-12-27 09:58:25 +0100
committerBo Yang <paulyang1211@gmail.com>2017-01-09 11:39:55 -0800
commita24ddc570f4357fc474384d0b84a2656a9a028a5 (patch)
treec6639582dca1718c3225afdd925b4ba52155af46
parentd1fde361a738aa86625bfd7fa7442ef28a6b3011 (diff)
downloadprotobuf-a24ddc570f4357fc474384d0b84a2656a9a028a5.tar.gz
protobuf-a24ddc570f4357fc474384d0b84a2656a9a028a5.tar.bz2
protobuf-a24ddc570f4357fc474384d0b84a2656a9a028a5.zip
Fix warning in compiler/js/embed.cc
embed.cc: In function ‘std::string CEscape(const string&)’: embed.cc:51:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < str.size(); ++i) { ^
-rw-r--r--src/google/protobuf/compiler/js/embed.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/js/embed.cc b/src/google/protobuf/compiler/js/embed.cc
index d04fea2e..a725b62e 100644
--- a/src/google/protobuf/compiler/js/embed.cc
+++ b/src/google/protobuf/compiler/js/embed.cc
@@ -48,7 +48,7 @@ static char ToDecimalDigit(int num) {
static std::string CEscape(const std::string& str) {
std::string dest;
- for (int i = 0; i < str.size(); ++i) {
+ for (size_t i = 0; i < str.size(); ++i) {
unsigned char ch = str[i];
switch (ch) {
case '\n': dest += "\\n"; break;