소스 검색

Fix signed-compare warning.

Jisi Liu 9 년 전
부모
커밋
7b1cbbd50e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;