-
-
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 - macos llvm - nonliteral format strings #885
Fightwarn - macos llvm - nonliteral format strings #885
Conversation
This pull request introduces 1 alert when merging 1396c273c5aadebd4e232b2fc67e92c930215964 into 27e1507 - view on LGTM.com new alerts:
|
Error reports from clang were cut short by their reporting limits, some more "appeared" in view after the cleanup. PR would grow :) |
…tring in this case
…t string in these cases
…os for cleaner fencing (nonliteral format strings)
…t string in this case
…acros for cleaner fencing (nonliteral format strings)
…at string in this case
…ros for cleaner fencing (nonliteral format strings)
…ros for cleaner fencing (nonliteral format strings)
…lem, and do not warn about nonliteral format string in this case
…rt macros for cleaner fencing (nonliteral format strings)
…ormat string in this case
…macros for cleaner fencing (nonliteral format strings)
… macros for cleaner fencing (nonliteral format strings)
…at string in these cases
…ros for cleaner fencing (nonliteral format strings)
…t macros for cleaner fencing (nonliteral format strings)
…iteral format string in these cases
…support macros for cleaner fencing (nonliteral format strings)
…t nonliteral format string in these cases
…gured-support macros for cleaner fencing (nonliteral format strings)
…eral format string in these cases
…pport macros for cleaner fencing (nonliteral format strings)
… string in this case
…ured-support macros for cleaner fencing (nonliteral format strings)
…bout nonliteral format string in these cases
…nfigured-support macros for cleaner fencing (nonliteral format strings)
…at string in this case
…igured-support macros for cleaner fencing (nonliteral format strings)
1396c27
to
659b288
Compare
This pull request introduces 1 alert when merging 659b288 into 58fff85 - view on LGTM.com new alerts:
|
Several more cases to go, but will go in another PR later, to have gains now and to keep changesets small. |
Follows up from #823 and #844 to address warnings from clang10 on MacOS builds: NUT extensively uses string variables from tables or calculated at runtime to pass into various likes of
snprintf()
and NUT's own routines with fmt+varargs syntax.This PR highlights such cases of intentional use of non-literal format strings with pragmas to quiesce GCC and CLANG warnings for this.
The main possible point of PR review is to double-check if these cases (now wrapped in pragmas, sometimes spanning large blocks of code with many
snprintf
s inside) are all intentional and unavoidable. Otherwise, there is little change from previous state of codebase (one avoidable case avoided), so this PR is not likely to break anything :)