You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using current git for Catch and compiling using a fair amount of warning flags Catch still produces a lot of warnings:
g++ -I../catch -g -fPIC -I. -W -Wall -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-noreturn -Wmissing-format-attribute -Wpacked -Winline -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wold-style-cast -Woverloaded-virtual -ffor-scope -o runtests tests/body.cc
In file included from ../catch/internal/catch_hub.h:18,
from ../catch/internal/catch_hub_impl.hpp:12,
from ../catch/catch_runner.hpp:16,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/internal/catch_interfaces_reporter.h:26: warning: ‘struct Catch::IReporterConfig’ has virtual functions but non-virtual destructor
In file included from ../catch/internal/catch_test_registry.hpp:16,
from ../catch/internal/catch_test_case_registry_impl.hpp:13,
from ../catch/internal/catch_hub_impl.hpp:14,
from ../catch/catch_runner.hpp:16,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/internal/catch_interfaces_testcase.h:44: warning: ‘struct Catch::ITestCaseRegistry’ has virtual functions but non-virtual destructor
In file included from ../catch/internal/catch_test_case_registry_impl.hpp:13,
from ../catch/internal/catch_hub_impl.hpp:14,
from ../catch/catch_runner.hpp:16,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/internal/catch_test_registry.hpp: In constructor ‘Catch::MethodTestCase<C>::MethodTestCase(void (C::*)())’:
../catch/internal/catch_test_registry.hpp:25: warning: declaration of ‘method’ shadows a member of 'this'
In file included from ../catch/internal/catch_hub_impl.hpp:14,
from ../catch/catch_runner.hpp:16,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/internal/catch_test_case_registry_impl.hpp: At global scope:
../catch/internal/catch_test_case_registry_impl.hpp:24: warning: ‘class Catch::TestRegistry’ has virtual functions but non-virtual destructor
../catch/internal/catch_test_case_registry_impl.hpp: In constructor ‘Catch::FreeFunctionTestCase::FreeFunctionTestCase(void (*)())’:
../catch/internal/catch_test_case_registry_impl.hpp:61: warning: declaration of ‘fun’ shadows a member of 'this'
In file included from ../catch/internal/catch_runner_impl.hpp:15,
from ../catch/internal/catch_hub_impl.hpp:15,
from ../catch/catch_runner.hpp:16,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/internal/catch_interfaces_runner.h: At global scope:
../catch/internal/catch_interfaces_runner.h:20: warning: ‘struct Catch::IRunner’ has virtual functions but non-virtual destructor
In file included from ../catch/internal/catch_runner_impl.hpp:17,
from ../catch/internal/catch_hub_impl.hpp:15,
from ../catch/catch_runner.hpp:16,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/internal/catch_config.hpp:28: warning: ‘class Catch::Config’ has virtual functions but non-virtual destructor
../catch/internal/catch_config.hpp: In member function ‘Catch::Config::List::What Catch::Config::listWhat() const’:
../catch/internal/catch_config.hpp:153: warning: use of old-style cast
../catch/internal/catch_config.hpp: In member function ‘Catch::Config::List::What Catch::Config::listAs() const’:
../catch/internal/catch_config.hpp:159: warning: use of old-style cast
../catch/internal/catch_config.hpp: In member function ‘void Catch::Config::setShouldDebugBreak(bool)’:
../catch/internal/catch_config.hpp:170: warning: declaration of ‘shouldDebugBreak’ shadows a member of 'this'
../catch/internal/catch_config.hpp: In member function ‘void Catch::Config::setShowHelp(bool)’:
../catch/internal/catch_config.hpp:182: warning: declaration of ‘showHelp’ shadows a member of 'this'
In file included from ../catch/internal/catch_hub_impl.hpp:17,
from ../catch/catch_runner.hpp:16,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/internal/catch_stream.hpp: In member function ‘int Catch::StreamBufImpl<WriterF, bufferSize>::overflow(int)’:
../catch/internal/catch_stream.hpp:44: warning: use of old-style cast
In file included from ../catch/catch_runner.hpp:18,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/internal/catch_commandline.hpp: In member function ‘void Catch::ArgParser::changeMode(const std::string&, Catch::ArgParser::Mode)’:
../catch/internal/catch_commandline.hpp:128: warning: use of old-style cast
../catch/internal/catch_commandline.hpp:130: warning: use of old-style cast
../catch/internal/catch_commandline.hpp:134: warning: use of old-style cast
In file included from ../catch/catch_runner.hpp:22,
from ../catch/catch_with_main.hpp:15,
from tests/body.cc:1:
../catch/catch_reporter_junit.hpp: In constructor ‘Catch::JunitReporter::TestCaseStats::TestCaseStats(const std::string&)’:
../catch/catch_reporter_junit.hpp:35: warning: declaration of ‘name’ shadows a member of 'this'
../catch/catch_reporter_junit.hpp: In constructor ‘Catch::JunitReporter::Stats::Stats(const std::string&)’:
../catch/catch_reporter_junit.hpp:49: warning: declaration of ‘name’ shadows a member of 'this'
The text was updated successfully, but these errors were encountered:
I'd only been compiling with -Wextra and -Wall.
I added your flags too and have now fixed all the warnings from those - although I didn't agree with some of them.
Using current git for Catch and compiling using a fair amount of warning flags Catch still produces a lot of warnings:
The text was updated successfully, but these errors were encountered: