-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
Fightwarn - static funcs and vars #903
Merged
jimklimov
merged 104 commits into
networkupstools:master
from
jimklimov:fightwarn-static-funcs-vars
Nov 26, 2020
Merged
Fightwarn - static funcs and vars #903
jimklimov
merged 104 commits into
networkupstools:master
from
jimklimov:fightwarn-static-funcs-vars
Nov 26, 2020
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
This pull request introduces 2 alerts and fixes 7 when merging bed618177d546766753683b90f9ecafa8025abc3 into 58fff85 - view on LGTM.com new alerts:
fixed alerts:
|
…dow global varnames "upsfd" (from scan_eaton_serial.c and main.c) with func argument "upsfd"
…me "bufIn" with same-named func argument
…d fix their indentation
…and fix their indentation
…fix their indentation
… to more suitable drivers/libhid.h
…ome are not currently used
…ng[] file-local variable as static, and fix its indentation
bed6181
to
28e892f
Compare
This pull request introduces 2 alerts and fixes 7 when merging 28e892f into 4f328b3 - view on LGTM.com new alerts:
fixed alerts:
|
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.
This PR eradicates all seen warnings about non-static variables and functions not pre-defined (e.g. exposed in headers as extern vars or known methods).
For a majority of cases the right way was indeed to declare them static in the file, some were also not used and so commented away.
In a few cases the shared variables and methods were in fact used, so marking them static broke test builds overall - so for those code was shuffled to expose them properly.
Another frequent "offense" was "invalid prototypes" where declarations of routines without parameters must convey
...(void)
explicitly. Implementations can stay with...()
it seems.Compiler is now satisfied, practical tests whether stuff works not performed however.
This PR plucks a couple of commits from other still open PRs in the fanout after #823 / #844 effort, to avoid merge conflicts later on.