Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation results in tons of warnings #64

Closed
JeffAbrahamson opened this issue Apr 30, 2015 · 1 comment
Closed

Compilation results in tons of warnings #64

JeffAbrahamson opened this issue Apr 30, 2015 · 1 comment
Assignees
Labels
solution: wontfix the issue will not be fixed (either it is impossible or deemed out of scope)

Comments

@JeffAbrahamson
Copy link

╭╴ (master=)╶╮
╰ jeff@siegfried:json $ uname -a
Linux siegfried 3.16.0-33-generic #44-Ubuntu SMP Thu Mar 12 12:19:35 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
╭╴ (master=)╶╮
╰ jeff@siegfried:json $ make
g++ -std=c++11 -Wall -Wextra -pedantic -Weffc++ -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wfloat-equal -I src -I test test/unit.cpp -o json_unit
In file included from test/unit.cpp:11:0:
test/catch.hpp:264:57: warning: ‘const T& Catch::operator+(const T&, Catch::StreamEndStop)’ should return by value [-Weffc++]
T const& operator + ( T const& value, StreamEndStop ) {
^
test/catch.hpp: In copy constructor ‘Catch::NotImplementedException::NotImplementedException(const Catch::NotImplementedException&)’:
test/catch.hpp:280:9: warning: ‘Catch::NotImplementedException::m_what’ should be initialized in the member initialization list [-Weffc++]
NotImplementedException( NotImplementedException const& ) {}
^
test/catch.hpp:280:9: warning: ‘Catch::NotImplementedException::m_lineInfo’ should be initialized in the member initialization list [-Weffc++]
In file included from test/unit.cpp:11:0:
test/catch.hpp: At global scope:
test/catch.hpp:478:7: warning: ‘class Catch::MethodTestCase’ only defines a private destructor and has no friends [-Wctor-dtor-privacy]
class MethodTestCase : public SharedImpl {
^
test/catch.hpp: In constructor ‘Catch::AssertionInfo::AssertionInfo()’:
test/catch.hpp:645:9: warning: ‘Catch::AssertionInfo::macroName’ should be initialized in the member initialization list [-Weffc++]
AssertionInfo() {}
^
test/catch.hpp:645:9: warning: ‘Catch::AssertionInfo::lineInfo’ should be initialized in the member initialization list [-Weffc++]
test/catch.hpp:645:9: warning: ‘Catch::AssertionInfo::capturedExpression’ should be initialized in the member initialization list [-Weffc++]
test/catch.hpp:645:9: warning: ‘Catch::AssertionInfo::resultDisposition’ should be initialized in the member initialization list [-Weffc++]
test/catch.hpp: In constructor ‘Catch::AssertionResultData::AssertionResultData()’:
test/catch.hpp:659:9: warning: ‘Catch::AssertionResultData::reconstructedExpression’ should be initialized in the member initialization list [-Weffc++]
AssertionResultData() : resultType( ResultWas::Unknown ) {}
^
test/catch.hpp:659:9: warning: ‘Catch::AssertionResultData::message’ should be initialized in the member initialization list [-Weffc++]

...

@nlohmann nlohmann self-assigned this May 1, 2015
@nlohmann
Copy link
Owner

nlohmann commented May 1, 2015

Hi @JeffAbrahamson, thanks for reporting!

I switched on the warnings to see whether there are warnings in the json.hpp header. The warnings you see all affect the Catch unit test framework, and I think this ticket addresses this issue.

All the best
Niels

@nlohmann nlohmann closed this as completed May 1, 2015
@nlohmann nlohmann added the solution: wontfix the issue will not be fixed (either it is impossible or deemed out of scope) label May 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: wontfix the issue will not be fixed (either it is impossible or deemed out of scope)
Projects
None yet
Development

No branches or pull requests

2 participants