Fix signed-compare warning.

pull/1365/head
Jisi Liu 9 years ago
parent 012ac9a0a6
commit 7b1cbbd50e
  1. 2
      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()); PyList_SET_ITEM(all_fields.get(), actual_size, t.release());
++actual_size; ++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) < (PyList_SetSlice(all_fields.get(), actual_size, fields.size(), NULL) <
0)) { 0)) {
return NULL; return NULL;

Loading…
Cancel
Save