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

Don't error on warnings by default #294

Merged
merged 1 commit into from
Nov 28, 2016
Merged

Conversation

nurupo
Copy link
Member

@nurupo nurupo commented Nov 27, 2016

Having -Werror set by default causes users' builds to fail because toxcore is not warning-free. Failing on errors is appropriate for the development phase, when running it in CI, but it doesn't make much sense to fail builds for users and let them figure out that they need to pass -DWARNINGS=OFF to make the library build.

Also, we should really address these warnings by fixing the code that causes them.


This change is Reviewable

@nurupo nurupo added the enhancement New feature for the user, not a new feature for build script label Nov 27, 2016
@nurupo nurupo added this to the v0.0.6 milestone Nov 27, 2016
@iphydf
Copy link
Member

iphydf commented Nov 27, 2016

Review status: 0 of 5 files reviewed at latest revision, 1 unresolved discussion.


CMakeLists.txt, line 75 at r1 (raw file):

  add_cflag("-pedantic")

  option(ERROR_ON_WARNING "Make compilation error on a warning" OFF)

Perhaps move this out of the outer if block, so it doesn't depend on extra warnings being disabled. You may want -Werror with default warnings (or extra ones set through CFLAGS).


Comments from Reviewable

@iphydf
Copy link
Member

iphydf commented Nov 27, 2016

Reviewed 5 of 5 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@nurupo
Copy link
Member Author

nurupo commented Nov 27, 2016

Reviewed 4 of 5 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


CMakeLists.txt, line 75 at r1 (raw file):

Previously, iphydf wrote… > Perhaps move this out of the outer if block, so it doesn't depend on extra warnings being disabled. You may want `-Werror` with default warnings (or extra ones set through `CFLAGS`).
Done.

Comments from Reviewable

@GrayHatter GrayHatter self-assigned this Nov 28, 2016
@GrayHatter
Copy link

:lgtm:


Reviewed 4 of 5 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


Comments from Reviewable

@iphydf
Copy link
Member

iphydf commented Nov 28, 2016

:lgtm_strong:


Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@iphydf
Copy link
Member

iphydf commented Nov 28, 2016

There is a really nice reasoning in the PR body. Can you put that into the comment?

Having -Werror set by default causes users' builds to fail because
toxcore is not warning-free. Failing on errors is appropriate for the
development phase, e.g. when building it in a CI enviroment, but it
doesn't make much sense to fail builds for users and let them figure out
that they need to pass -DWARNINGS=OFF to make the library build.
@nurupo
Copy link
Member Author

nurupo commented Nov 28, 2016

Done.

@iphydf iphydf merged commit f0f53db into TokTok:master Nov 28, 2016
@iphydf iphydf modified the milestones: v0.0.6, v0.1.0 Dec 10, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature for the user, not a new feature for build script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants