Browse Source

Merge pull request #35 from dsrosario/fix_warning

Fix "warning C4018: '<' : signed/unsigned mismatch"
Feng Xiao 11 years ago
parent
commit
c1d16457db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/google/protobuf/wire_format_lite_inl.h

+ 1 - 1
src/google/protobuf/wire_format_lite_inl.h

@@ -390,7 +390,7 @@ inline bool WireFormatLite::ReadPackedFixedSizePrimitive(
     // safely allocate.  We read as much as we can into *values
     // safely allocate.  We read as much as we can into *values
     // without pre-allocating "length" bytes.
     // without pre-allocating "length" bytes.
     CType value;
     CType value;
-    for (int i = 0; i < new_entries; ++i) {
+    for (uint32 i = 0; i < new_entries; ++i) {
       if (!ReadPrimitive<CType, DeclaredType>(input, &value)) return false;
       if (!ReadPrimitive<CType, DeclaredType>(input, &value)) return false;
       values->Add(value);
       values->Add(value);
     }
     }