jwgrenning / cpputest-starter-project

gcc cpputest starter project, with instructions to help get your legacy code into cpputest for the first time
MIT License
111 stars 56 forks source link

'setup' overrides a member function but is not marked 'override' #7

Closed malmetom closed 3 years ago

malmetom commented 3 years ago

Hi, I get the following error when running "make all" according to the guide in the README,

compiling ExampleTest.cpp tests/ExampleTest.cpp:10:10: fatal error: 'setup' overrides a member function but is not marked 'override' [-Wsuggest-override] void setup() ^ /Users/xx/tools/cpputest/include/CppUTest/Utest.h:55:18: note: overridden virtual function is here virtual void setup(); ^ 1 error generated. make: *** [test-obj/tests/ExampleTest.o] Error 1

Im running on Mac

However when using the alternative in step 7) Docker support,

docker-compose run cpputest make all

Everything compiles and the tests run as expected.

Any idea whats going wrong here?

jwgrenning commented 3 years ago

Hi

Sorry for the later reply. I would turn that warning off -Wno-suggest-override in the makefile.

Compiler warnings are a moving target. It's a never-ending battle.

Cheers, James

TMT23 commented 2 years ago

I get same error but in my makefile don't have -Wno-sugguest-override