GCC unsigned/signed integer comparison warning
Created by: wangkuiyi
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_rnn_encoder_decoder.cc:15:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_rnn_encoder_decoder.cc:63:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^
In file included from /paddle/paddle/fluid/framework/lod_tensor.h:23:0,
from /paddle/paddle/fluid/inference/tests/book/test_helper.h:16,
from /paddle/paddle/fluid/inference/tests/book/test_inference_recommender_system.cc:17:
/paddle/build/third_party/install/glog/include/glog/logging.h: In instantiation of ‘std::__cxx11::string* google::Check_EQImpl(const T1&, const T2&, const char*) [with T1 = long int; T2 = long unsigned int; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
/paddle/paddle/fluid/inference/tests/book/test_helper.h:37:3: required from ‘void SetupTensor(paddle::framework::LoDTensor&, paddle::framework::DDim, std::vector<_RealType>&) [with T = long int]’
/paddle/paddle/fluid/inference/tests/book/test_inference_recommender_system.cc:39:62: required from here
/paddle/build/third_party/install/glog/include/glog/logging.h:717:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
DEFINE_CHECK_OP_IMPL(Check_EQ, ==) // Compilation error with CHECK_EQ(NULL, x)?
^
/paddle/build/third_party/install/glog/include/glog/logging.h:148:53: note: in definition of macro ‘GOOGLE_PREDICT_TRUE’
#define GOOGLE_PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
^
/paddle/build/third_party/install/glog/include/glog/logging.h:717:1: note: in expansion of macro ‘DEFINE_CHECK_OP_IMPL’
DEFINE_CHECK_OP_IMPL(Check_EQ, ==) // Compilation error with CHECK_EQ(NULL, x)?
^
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_fit_a_line.cc:12:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_fit_a_line.cc:55:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_understand_sentiment.cc:15:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_understand_sentiment.cc:58:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc:15:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_recognize_digits.cc:61:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_recommender_system.cc:15:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_recommender_system.cc:85:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_image_classification.cc:15:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_image_classification.cc:61:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_image_classification.cc:15:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_image_classification.cc:61:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_word2vec.cc:15:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_word2vec.cc:66:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^
In file included from /paddle/paddle/fluid/inference/tests/book/test_inference_label_semantic_roles.cc:15:0:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h: In instantiation of ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int]’:
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1421:23: required from ‘static testing::AssertionResult testing::internal::EqHelper<lhs_is_null_literal>::Compare(const char*, const char*, const T1&, const T2&) [with T1 = long unsigned int; T2 = int; bool lhs_is_null_literal = false]’
/paddle/paddle/fluid/inference/tests/book/test_helper.h:87:3: required from ‘void CheckError(paddle::framework::LoDTensor&, paddle::framework::LoDTensor&) [with T = float]’
/paddle/paddle/fluid/inference/tests/book/test_inference_label_semantic_roles.cc:75:37: required from here
/paddle/build/third_party/install/gtest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
^