Get rid of integer overflow warning.
PR: misc/3575 Submitted by: Bruce Evans <bde@zeta.org.au>
This commit is contained in:
parent
ed2190ca0b
commit
07ee29d4fd
@ -105,7 +105,7 @@ strtoq(nptr, endptr, base)
|
||||
* overflow.
|
||||
*/
|
||||
qbase = (unsigned)base;
|
||||
cutoff = neg ? -(u_quad_t)QUAD_MIN : QUAD_MAX;
|
||||
cutoff = neg ? (u_quad_t)-(QUAD_MIN + QUAD_MAX) + QUAD_MAX : QUAD_MAX;
|
||||
cutlim = cutoff % qbase;
|
||||
cutoff /= qbase;
|
||||
for (acc = 0, any = 0;; c = *s++) {
|
||||
|
@ -105,7 +105,7 @@ strtoq(nptr, endptr, base)
|
||||
* overflow.
|
||||
*/
|
||||
qbase = (unsigned)base;
|
||||
cutoff = neg ? -(u_quad_t)QUAD_MIN : QUAD_MAX;
|
||||
cutoff = neg ? (u_quad_t)-(QUAD_MIN + QUAD_MAX) + QUAD_MAX : QUAD_MAX;
|
||||
cutlim = cutoff % qbase;
|
||||
cutoff /= qbase;
|
||||
for (acc = 0, any = 0;; c = *s++) {
|
||||
|
Loading…
Reference in New Issue
Block a user