Fix compiler warnings in stdio-common/_itoa.c and stdio-common/_itowa.c
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
This changes fixes several warning seen building glibc on
hppa-linux-gnu.
Okay for master?
Dave
---
Fix compiler warnings in stdio-common/_itoa.c and stdio-common/_itowa.c
@@ -340,8 +340,8 @@ _itoa (unsigned long long int value, char *buflim, unsigned int base,
if (big_normalization_steps == 0)
xh = 0;
else
- xh = (mp_limb_t) (value >> 64 - big_normalization_steps);
- xl = (mp_limb_t) (value >> 32 - big_normalization_steps);
+ xh = (mp_limb_t) (value >> (64 - big_normalization_steps));
+ xl = (mp_limb_t) (value >> (32 - big_normalization_steps));
udiv_qrnnd (x1hi, r, xh, xl, big_base_norm);
xl = ((mp_limb_t) value) << big_normalization_steps;
@@ -352,7 +352,7 @@ _itoa (unsigned long long int value, char *buflim, unsigned int base,
xh = x1hi;
else
xh = ((x1hi << big_normalization_steps)
- | (x1lo >> 32 - big_normalization_steps));
+ | (x1lo >> (32 - big_normalization_steps)));
xl = x1lo << big_normalization_steps;
udiv_qrnnd (t[0], x, xh, xl, big_base_norm);
t[1] = x >> big_normalization_steps;
@@ -228,8 +228,8 @@ _itowa (unsigned long long int value, wchar_t *buflim, unsigned int base,
if (big_normalization_steps == 0)
xh = 0;
else
- xh = (mp_limb_t) (value >> 64 - big_normalization_steps);
- xl = (mp_limb_t) (value >> 32 - big_normalization_steps);
+ xh = (mp_limb_t) (value >> (64 - big_normalization_steps));
+ xl = (mp_limb_t) (value >> (32 - big_normalization_steps));
udiv_qrnnd (x1hi, r, xh, xl, big_base_norm);
xl = ((mp_limb_t) value) << big_normalization_steps;
@@ -240,7 +240,7 @@ _itowa (unsigned long long int value, wchar_t *buflim, unsigned int base,
xh = x1hi;
else
xh = ((x1hi << big_normalization_steps)
- | (x1lo >> 32 - big_normalization_steps));
+ | (x1lo >> (32 - big_normalization_steps)));
xl = x1lo << big_normalization_steps;
udiv_qrnnd (t[0], x, xh, xl, big_base_norm);
t[1] = x >> big_normalization_steps;