-Wunreachable-code
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 6 repliesIn review
- v23 patches 5 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | run-command: use errno to check for sigfillset() errorrun-command.c | +9 | 0 replies | |
| 2/3 | git-compat-util: add NOT_CONSTANT macro and use it in atfork_prepare()Makefile compiler-tricks/ git-compat-util.h +2 more | +18 | 5 replies | |
| 3/3 | config.mak.dev: enable -Wunreachable-codeconfig.mak.dev meson.build | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/3] -Wunreachable-code
As Taylor noticed, we can still help macOS users by first dealing with the false positive in the code, and then flip the warning option for developers on.
[1/3] run-command: use errno to check for sigfillset() error
This was our first "workaround" that is very specific to the code that gets falsely flagged by the compiler.
[2/3] git-compat-util: add NOT_CONSTANT macro and use it in atfork_prepare()
This adds a more generic way to work around a false positive from -Wunreachable-code to prevent compilers from optimize away expressions that are used in conditionals, and rewrite the earlier workaround with it.
[3/3] config.mak.dev: enable -Wunreachable-code
Now we worked around known false positive of -Wunreachable-code, we force it upon our developers, including macOS ones.
This is totally offtopic, but I often find the short-log (list of commits, grouped by author) in the cover letter very awkward to work with. Between v2 and v3, aside from the NOT_CONSTANT() improvements in the patch [2/3] that used to be [3/3], one large change is the reordering of the patches but that is not seen in the shortlog (I ran "git log --oneline -reverse" to prepare the list of commits in the order they are applied to describe them in the above list).
Jeff King (2):
run-command: use errno to check for sigfillset() error config.mak.dev: enable -Wunreachable-code
Junio C Hamano (1):
git-compat-util: add NOT_CONSTANT macro and use it in atfork_prepare()
Makefile | 1 + compiler-tricks/not-a-constant.c | 2 ++ config.mak.dev | 1 + git-compat-util.h | 9 +++++++++ meson.build | 2 ++ run-command.c | 8 +++++++- 6 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 compiler-tricks/not-a-constant.c
Signature · 1 line
2.49.0-207-gc8924421c3