Skip to content
Commit 5abcddd7 authored by Gabriel F. T. Gomes's avatar Gabriel F. T. Gomes
Browse files

Fix parentheses error in iconvconfig.c and ld-collate.c [BZ #24372]



When -Werror=parentheses is in use, iconvconfig.c builds fail with:

  iconvconfig.c: In function ‘write_output’:
  iconvconfig.c:1084:34: error: suggest parentheses around ‘+’ inside ‘>>’ [-Werror=parentheses]
     hash_size = next_prime (nnames + nnames >> 1);
                             ~~~~~~~^~~~~~~~

This patch adds parentheses to the expression.  Not where suggested by
the compiler warning, but where it produces the expected result, i.e.:
where it has the effect of multiplying nnames by 1.5.

Likewise for elem_size in ld-collate.c.

Tested for powerpc64le.

Reviewed-by: default avatarCarlos O'Donell <carlos@redhat.com>
parent ac64195c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment