Skip to content

Compiler warnings in test_node_crypto.cc #63325

@targos

Description

@targos
In file included from ../../test/cctest/test_node_crypto.cc:8:
../../deps/googletest/include/gtest/gtest.h:1485:28: warning: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Wsign-compare]
 1485 | GTEST_IMPL_CMP_HELPER_(GT, >)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../deps/googletest/include/gtest/gtest.h:1467:14: note: expanded from macro 'GTEST_IMPL_CMP_HELPER_'
 1467 |     if (val1 op val2) {                                                    \
      |         ~~~~ ^  ~~~~
../../test/cctest/test_node_crypto.cc:31:3: note: in instantiation of function template specialization 'testing::internal::CmpHelperGT<unsigned long, int>' requested here
   31 |   EXPECT_GT(node::crypto::kSizeOf_SSL_CTX, 0)
      |   ^
../../deps/googletest/include/gtest/gtest.h:1906:44: note: expanded from macro 'EXPECT_GT'
 1906 |   EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperGT, val1, val2)
      |                                            ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:144:23: note: expanded from macro 'EXPECT_PRED_FORMAT2'
  144 |   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
      |                       ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:134:17: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  134 |   GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), on_failure)
      |                 ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
   79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
      |                                                    ^
In file included from ../../test/cctest/test_node_crypto.cc:8:
../../deps/googletest/include/gtest/gtest.h:1481:28: warning: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Wsign-compare]
 1481 | GTEST_IMPL_CMP_HELPER_(LT, <)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../deps/googletest/include/gtest/gtest.h:1467:14: note: expanded from macro 'GTEST_IMPL_CMP_HELPER_'
 1467 |     if (val1 op val2) {                                                    \
      |         ~~~~ ^  ~~~~
../../test/cctest/test_node_crypto.cc:39:3: note: in instantiation of function template specialization 'testing::internal::CmpHelperLT<unsigned long, int>' requested here
   39 |   EXPECT_LT(node::crypto::kSizeOf_SSL_CTX, 10000)
      |   ^
../../deps/googletest/include/gtest/gtest.h:1902:44: note: expanded from macro 'EXPECT_LT'
 1902 |   EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperLT, val1, val2)
      |                                            ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:144:23: note: expanded from macro 'EXPECT_PRED_FORMAT2'
  144 |   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
      |                       ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:134:17: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  134 |   GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), on_failure)
      |                 ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
   79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
      |                                                    ^
In file included from ../../test/cctest/test_node_crypto.cc:8:
../../deps/googletest/include/gtest/gtest.h:1399:11: warning: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Wsign-compare]
 1399 |   if (lhs == rhs) {
      |       ~~~ ^  ~~~
../../deps/googletest/include/gtest/gtest.h:1418:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
 1418 |     return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
      |            ^
../../test/cctest/test_node_crypto.cc:47:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here
   47 |   EXPECT_EQ(node::crypto::kSizeOf_SSL_CTX, 240);
      |   ^
../../deps/googletest/include/gtest/gtest.h:1896:54: note: expanded from macro 'EXPECT_EQ'
 1896 |   EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
      |                                                      ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:144:23: note: expanded from macro 'EXPECT_PRED_FORMAT2'
  144 |   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
      |                       ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:134:17: note: expanded from macro 'GTEST_PRED_FORMAT2_'
  134 |   GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), on_failure)
      |                 ^
../../deps/googletest/include/gtest/gtest_pred_impl.h:79:52: note: expanded from macro 'GTEST_ASSERT_'
   79 |   if (const ::testing::AssertionResult gtest_ar = (expression)) \
      |                                                    ^
3 warnings generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions