Explorar o código

Fix signed-compare warning.

Jisi Liu %!s(int64=9) %!d(string=hai) anos
pai
achega
7b1cbbd50e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      python/google/protobuf/pyext/message.cc

+ 1 - 1
python/google/protobuf/pyext/message.cc

@@ -2140,7 +2140,7 @@ static PyObject* ListFields(CMessage* self) {
     PyList_SET_ITEM(all_fields.get(), actual_size, t.release());
     ++actual_size;
   }
-  if (actual_size != fields.size() &&
+  if (static_cast<size_t>(actual_size) != fields.size() &&
       (PyList_SetSlice(all_fields.get(), actual_size, fields.size(), NULL) <
        0)) {
     return NULL;