Pacify clang 14 -Wbitwise-conditional-parentheses

* src/common.h (add_printf):
* src/sparse.c (decode_num):
Parenthesize to pacify Apple clang version 14.0.0 (clang-1400.0.29.202).
This commit is contained in:
Paul Eggert
2025-11-15 13:21:59 -08:00
parent 8d8e441bb5
commit b53b39209e
2 changed files with 2 additions and 2 deletions

View File

@@ -501,7 +501,7 @@ COMMON_INLINE intmax_t
add_printf (intmax_t a, intmax_t b)
{
intmax_t sum;
return (a < 0) | (b < 0) | ckd_add (&sum, a, b) ? -1 : sum;
return ((a < 0) | (b < 0) | ckd_add (&sum, a, b)) ? -1 : sum;
}
/* Module create.c. */

View File

@@ -1255,7 +1255,7 @@ decode_num (struct block_ptr bp, uintmax_t nmax, struct tar_sparse_file *file)
overflow |= nmax < n;
char const *msgid
= (!digit_seen | nondigit_seen ? N_("%s: malformed sparse archive member")
= ((!digit_seen | nondigit_seen) ? N_("%s: malformed sparse archive member")
: overflow ? N_("%s: numeric overflow in sparse archive member")
: NULL);
if (msgid)