From: Michael Vrable Date: Tue, 1 Jul 2008 04:35:13 +0000 (-0700) Subject: Eliminate a gcc warning. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=d6ac4affcd30b889ef69ab2c2d7e31c756cc6c6f;p=cumulus.git Eliminate a gcc warning. Add parentheses around arithmetic near a shift operator, to get rid of a gcc warning. The code was correct before, and this change causes it to diverge from the LBFS sources it was derived from, but it is worthwhile to get rid of the gcc warning. --- diff --git a/chunk.cc b/chunk.cc index f1f60e8..170030f 100644 --- a/chunk.cc +++ b/chunk.cc @@ -123,13 +123,13 @@ polymod (uint64_t nh, uint64_t nl, uint64_t d) nh ^= d; for (int i = 62; i >= 0; i--) if (nh & INT64 (1) << i) { - nh ^= d >> 63 - i; - nl ^= d << i + 1; + nh ^= d >> (63 - i); + nl ^= d << (i + 1); } } for (int i = 63; i >= k; i--) if (nl & INT64 (1) << i) - nl ^= d >> 63 - i; + nl ^= d >> (63 - i); return nl; }