Closed Brett208 closed 4 years ago
Tagging issues #176 and #175 as related.
The new warnings here seem to be related to the signed/unsigned comparisons in the unit test code.
The enum size warnings are a deeper problem, which are tracked in issue #176.
Should be quick to fix the signed/unsigned warnings.
g++ -Isrc -I/usr/src/googletest/googletest/include/ -MT .build/testObj/BitTwiddle.test.o -MMD -MP -MF .build/testObj/BitTwiddle.test.Td -std=c++17 -g -Wall -Wno-unknown-pragmas -c -o .build/testObj/BitTwiddle.test.o -Isrc test/BitTwiddle.test.cpp In file included from test/BitTwiddle.test.cpp:2:0: /usr/src/googletest/googletest/include/gtest/gtest.h: In instantiation of 'testing::AssertionResult testing::internal::CmpHelperEQ(const char, const char, const T1&, const T2&) [with T1 = int; T2 = unsigned int]': /usr/src/googletest/googletest/include/gtest/gtest.h:1459:23: required from 'static testing::AssertionResult testing::internal::EqHelper::Compare(const char, const char, const T1&, const T2&, typename testing::internal::EnableIf<(! testing::internal::is_pointer::value)>::type*) [with T1 = int; T2 = unsigned int; typename testing::internal::EnableIf<(! testing::internal::is_pointer::value)>::type = void]'
test/BitTwiddle.test.cpp:27:2: required from here
/usr/src/googletest/googletest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {
/usr/src/googletest/googletest/include/gtest/gtest.h:1530:28: GTEST_IMPL_CMPHELPER(GT, >); /usr/src/googletest/googletest/include/gtest/gtest.h:1510:12: note: in definition of macro 'GTEST_IMPL_CMPHELPER' if (val1 op val2) {\ ^~ /usr/src/googletest/googletest/include/gtest/gtest.h: In instantiation of 'testing::AssertionResult testing::internal::CmpHelperEQ(const char, const char, const T1&, const T2&) [with T1 = int; T2 = long unsigned int]': /usr/src/googletest/googletest/include/gtest/gtest.h:1459:23: required from 'static testing::AssertionResult testing::internal::EqHelper::Compare(const char, const char, const T1&, const T2&, typename testing::internal::EnableIf<(! testing::internal::is_pointer::value)>::type*) [with T1 = int; T2 = long unsigned int; typename testing::internal::EnableIf<(! testing::internal::is_pointer::value)>::type = void]'
test/Archive/ArchiveFile.test.cpp:65:2: required from here
/usr/src/googletest/googletest/include/gtest/gtest.h:1392:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (lhs == rhs) {