-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Enable more compiler warnings #1578
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, that warning was only implicitly active in C90 mode. Enable it unconditionally as already done for GCC.
Enable -Wdouble-promotion for both GCC and clang. It warns on implicit promotion from float to double.
It usually warns when forgetting to declare TU-local variables static.
It usually warns when using commas instead of semicolons or other operators by accident.
The configure-based build also has this in addition to -Wall.
bagder
approved these changes
Jun 16, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 👍 on more warning options!
Thanks! |
MarcelRaad
added a commit
to MarcelRaad/curl
that referenced
this pull request
Jun 16, 2017
Previously, that warning was only implicitly active in C90 mode. Enable it unconditionally as already done for GCC. Closes curl#1578
MarcelRaad
added a commit
to MarcelRaad/curl
that referenced
this pull request
Jun 16, 2017
Enable -Wdouble-promotion for both GCC and clang. It warns on implicit promotion from float to double. Closes curl#1578
MarcelRaad
added a commit
to MarcelRaad/curl
that referenced
this pull request
Jun 16, 2017
It usually warns when forgetting to declare TU-local variables static. Closes curl#1578
MarcelRaad
added a commit
to MarcelRaad/curl
that referenced
this pull request
Jun 16, 2017
It usually warns when using commas instead of semicolons or other operators by accident. Closes curl#1578
MarcelRaad
added a commit
to MarcelRaad/curl
that referenced
this pull request
Jun 16, 2017
The configure-based build also has this in addition to -Wall. Closes curl#1578
It seems odd that it would be limited in that way. Probably there was some lag and you just beat it to the punch. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All of these are fixed and trivial to fix. Tested with all possible combinations of
I could also push a subset if anyone feels that some of these warnings make no sense.