From db4df7dda6e209e3e38fe69298624ffe92d392c7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 6 Jul 2010 16:16:20 -0700 Subject: du: avoid spurious warnings with 64-bit gcc -W Problem reported by Jim Meyering in: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6524#74 * gl/lib/di-set.c (di_ent_hash): Rework so that the compiler does not incorrectly warn about shifting by 64-bits in unreachable code. * gl/lib/ino-map.c (ino_hash): Likewise. --- gl/lib/ino-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gl/lib/ino-map.c') diff --git a/gl/lib/ino-map.c b/gl/lib/ino-map.c index c86898365..cc9a131c9 100644 --- a/gl/lib/ino-map.c +++ b/gl/lib/ino-map.c @@ -61,7 +61,7 @@ ino_hash (void const *x, size_t table_size) size_t h = ino; int i; for (i = 1; i < sizeof ino / sizeof h + (sizeof ino % sizeof h != 0); i++) - h ^= ino >>= CHAR_BIT * sizeof h; + h ^= ino >> CHAR_BIT * sizeof h * i; return h % table_size; } -- cgit v1.2.3-54-g00ecf