Skip to content

Fightwarn - macos llvm - noreturn#879

Merged
jimklimov merged 48 commits intonetworkupstools:masterfrom
jimklimov:fightwarn-macos-llvm-noreturn
Nov 21, 2020
Merged

Fightwarn - macos llvm - noreturn#879
jimklimov merged 48 commits intonetworkupstools:masterfrom
jimklimov:fightwarn-macos-llvm-noreturn

Conversation

@jimklimov
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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