Skip to content

Conversation

wjsl
Copy link

@wjsl wjsl commented Nov 19, 2018

when compiling on ubuntu 16.04 w/ gcc-7, I get the following error:

~/rep-cpp$ make
g++ -Wall -Werror -std=c++11 -Iinclude/ -Ideps/url-cpp/include -Ideps/googletest/googletest/include -g -fprofile-arcs -ftest-coverage -O0 -fPIC -o test/test-agent.o -c test/test-agent.cpp
In file included from test/test-agent.cpp:1:0:
deps/googletest/googletest/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]’:
deps/googletest/googletest/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]’
test/test-agent.cpp:8:5:   required from here
deps/googletest/googletest/include/gtest/gtest.h:1392:11: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   if (lhs == rhs) {
       ~~~~^~~~~~
cc1plus: all warnings being treated as errors
Makefile:47: recipe for target 'test/test-agent.o' failed
make: *** [test/test-agent.o] Error

There is some tangential drama about these warnings in googletest, but I found this was a simpler fix.

Copy link

@dlecocq dlecocq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants