]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/use-wunreachable-code-for-devs'
authorJunio C Hamano <gitster@pobox.com>
Sat, 29 Mar 2025 07:39:10 +0000 (16:39 +0900)
committerJunio C Hamano <gitster@pobox.com>
Sat, 29 Mar 2025 07:39:10 +0000 (16:39 +0900)
Enable -Wunreachable-code for developer builds.

* jk/use-wunreachable-code-for-devs:
  config.mak.dev: enable -Wunreachable-code
  git-compat-util: add NOT_CONSTANT macro and use it in atfork_prepare()
  run-command: use errno to check for sigfillset() error

1  2 
Makefile
git-compat-util.h
meson.build

diff --cc Makefile
index efd8215c04e280bd39493f6e369b67aa4ff2d8a3,79121c5a925d3933c0b118a7e61815a312444937..ac32d2d0bdae93b6065aaf20efb27c3380f91e63
+++ b/Makefile
@@@ -995,6 -984,8 +995,7 @@@ LIB_OBJS += common-init.
  LIB_OBJS += compat/nonblock.o
  LIB_OBJS += compat/obstack.o
  LIB_OBJS += compat/terminal.o
 -LIB_OBJS += compat/zlib-uncompress2.o
+ LIB_OBJS += compiler-tricks/not-constant.o
  LIB_OBJS += config.o
  LIB_OBJS += connect.o
  LIB_OBJS += connected.o
Simple merge
diff --cc meson.build
index 0902e121894a46254e468e1c80951dc2688e618a,0c1904b94b020bd723fccfb75b28751602110034..33d92c066c623ec62d58c01f05a611da73c25d5e
@@@ -264,6 -248,8 +264,7 @@@ libgit_sources = 
    'compat/nonblock.c',
    'compat/obstack.c',
    'compat/terminal.c',
 -  'compat/zlib-uncompress2.c',
+   'compiler-tricks/not-constant.c',
    'config.c',
    'connect.c',
    'connected.c',