From d6ac4affcd30b889ef69ab2c2d7e31c756cc6c6f Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Mon, 30 Jun 2008 21:35:13 -0700 Subject: [PATCH] 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. --- chunk.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.20.1