diff options
Diffstat (limited to 'run-command.c')
| -rw-r--r-- | run-command.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c index 94f2f3079f..8833b23367 100644 --- a/run-command.c +++ b/run-command.c @@ -1,4 +1,5 @@ #define USE_THE_REPOSITORY_VARIABLE +#define DISABLE_SIGN_COMPARE_WARNINGS #include "git-compat-util.h" #include "run-command.h" @@ -514,7 +515,13 @@ static void atfork_prepare(struct atfork_state *as) { sigset_t all; - if (sigfillset(&all)) + /* + * POSIX says sigfillset() can fail, but an overly clever + * compiler can see through the header files and decide + * it cannot fail on a particular platform it is compiling for, + * triggering -Wunreachable-code false positive. + */ + if (NOT_CONSTANT(sigfillset(&all))) die_errno("sigfillset"); #ifdef NO_PTHREADS if (sigprocmask(SIG_SETMASK, &all, &as->old)) |
