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.
size_t h = dev;
int i;
for (i = 1; i < sizeof dev / sizeof h + (sizeof dev % sizeof h != 0); i++)
- h ^= dev >>= CHAR_BIT * sizeof h;
+ h ^= dev >> CHAR_BIT * sizeof h * i;
return h % 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;
}