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

Fightwarn - macos llvm - noreturn #879

Merged

Conversation

jimklimov
Copy link
Member

Follows up from #823 and #844 to address warnings from clang10 on MacOS builds: pre-declare attributes for routines that exit() so the compiler can optimize for no return path handling.

@jimklimov jimklimov added the ready / code review Author (and CI) consider the PR worthy of human rewievers' time label Nov 17, 2020
@jimklimov
Copy link
Member Author

Error reports from clang were cut short by their reporting limits, some more "appeared" in view after the cleanup. PR would grow :)

… upsd.c and main.c) with func argument "progname"
…ribute__((...)) use-cases of interest to NUT
…warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now
… warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now
…er warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now
…ifndef HAVE___ATTRIBUTE__NORETURN" to avoid warnings
…ifndef HAVE___ATTRIBUTE__NORETURN" to avoid warnings
…er warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now
…mpiler warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now
… compiler warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now
…mpiler warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now
…mpiler warnings with "ifndef HAVE___ATTRIBUTE__NORETURN" to avoid opposite warnings now
…a legacy off-chance that fatalx() might not exit the program
…andle a legacy off-chance that fatalx() might not exit the program
…e handle a legacy off-chance that fatalx() might not exit the program
@jimklimov jimklimov force-pushed the fightwarn-macos-llvm-noreturn branch from 46383fb to 7ce0e11 Compare November 20, 2020 18:05
@lgtm-com
Copy link

lgtm-com bot commented Nov 20, 2020

This pull request fixes 1 alert when merging 7ce0e11 into 709800c - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready / code review Author (and CI) consider the PR worthy of human rewievers' time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant