Fix some shift-op-parentheses warnings
This commit is contained in:
@@ -65,10 +65,10 @@ unsigned strhash(const char *p)
|
||||
while (*p != '\0')
|
||||
{
|
||||
h = (h << 4) + (unsigned)CHARADV(p);
|
||||
if (g = h & ((unsigned)0xF << BITS(unsigned) - 4))
|
||||
if ((g = h) & ((unsigned)0xF << (BITS(unsigned) - 4)))
|
||||
{
|
||||
h ^= g >> BITS(unsigned) - 4;
|
||||
h ^= g;
|
||||
h ^= g >> (BITS(unsigned) - 4);
|
||||
h ^= g;
|
||||
}
|
||||
}
|
||||
return h;
|
||||
@@ -93,10 +93,10 @@ unsigned strhashi(const char *p)
|
||||
h = (h << 4) + (unsigned)tolower(*p++);
|
||||
}
|
||||
|
||||
if (g = h & ((unsigned)0xF << BITS(unsigned) - 4))
|
||||
if ((g = h) & ((unsigned)0xF << (BITS(unsigned) - 4)))
|
||||
{
|
||||
h ^= g >> BITS(unsigned) - 4;
|
||||
h ^= g;
|
||||
h ^= g >> (BITS(unsigned) - 4);
|
||||
h ^= g;
|
||||
}
|
||||
}
|
||||
return h;
|
||||
|
||||
@@ -234,7 +234,7 @@ BuildLockMaskSequence(void)
|
||||
* funny because we skip the case of all the
|
||||
* bits cleared.
|
||||
*/
|
||||
run = (0x1 << bit-1); /* number of consecutive masks to set
|
||||
run = (0x1 << (bit-1)); /* number of consecutive masks to set
|
||||
bits in */
|
||||
bit_on = False; /* are we setting bits or not? */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user