-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add -Wmissing-declarations #30759
Merged
kevingranade
merged 5 commits into
CleverRaven:master
from
jbytheway:missing_declarations
May 23, 2019
Merged
Add -Wmissing-declarations #30759
kevingranade
merged 5 commits into
CleverRaven:master
from
jbytheway:missing_declarations
May 23, 2019
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
KorGgenT
added
the
Code: Build
Issues regarding different builds and build environments
label
May 22, 2019
jbytheway
changed the title
Add -Wmissing-declarations
[WIP] Add -Wmissing-declarations
May 22, 2019
Looks like I forgot to check the json formatter code... |
jbytheway
changed the title
[WIP] Add -Wmissing-declarations
Add -Wmissing-declarations
May 22, 2019
Well there's a point against moving the win curses build out of the PR build list :/
|
This warning helps keep code tidy and comprehensible by ensuring functions local to a single file are marked static, and get removed when no longer used. It also helps the optimizer reason about the code.
jbytheway
force-pushed
the
missing_declarations
branch
from
May 23, 2019 08:49
a48f773
to
28860a9
Compare
Ensure that only the ones being used get compiled.
Looks promising. Gorgon complaint was just due to the |
jbytheway
added a commit
to jbytheway/Cataclysm-DDA
that referenced
this pull request
May 24, 2019
Merging CleverRaven#30759 broke the build by introducing a compile failure in chkjson. This should be built on Travis to allow detection of such issues. Previously chkjson was only built on Jenkins, but that doesn't happen when the Makefile changes, so this problem went undetected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
SUMMARY: Infrastructure "Compile with -Wmissing-declarations by default"
Purpose of change
This warning helps keep code tidy and comprehensible by ensuring functions local to a single file are marked static. This offers:
Describe the solution
Enable
-Wmissing-declarations
and tidy up remaining failures related to that warning.Add to
Makefile
andCMakeLists.txt