Skip to content

Build without warnings with -pedantic enabled. #130

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

Merged
merged 1 commit into from
Jan 22, 2015
Merged

Build without warnings with -pedantic enabled. #130

merged 1 commit into from
Jan 22, 2015

Conversation

connormanning
Copy link
Contributor

I was trying to bundle amalgamated JsonCpp in a project that is being built with -Werror and -pedantic and had to make this change to avoid a bitfield overflow warning:

  CXX(target) Release/obj.target/project/third/jsoncpp.o
../third/jsoncpp.cpp: In copy constructor ‘Json::Value::Value(const Json::Value&)’:
../third/jsoncpp.cpp:1831:18: error: overflow in implicit constant conversion [-Werror=overflow]
       allocated_ = true;
                  ^
cc1plus: all warnings being treated as errors
make[2]: *** [Release/obj.target/project/third/jsoncpp.o] Error 1

It's kind of a silly change (so feel free to reject) but since it's the only warning emitted I thought it might be worth pulling in.

cdunn2001 added a commit that referenced this pull request Jan 22, 2015
Build without warnings with -pedantic enabled.
@cdunn2001 cdunn2001 merged commit e3f2428 into open-source-parsers:master Jan 22, 2015
@cdunn2001
Copy link
Contributor

Interesting. Thanks!

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.

3 participants