ソースを参照

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;