This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
PATCH : libiberty/strtoul/ && within ||
- To: "Philippe De Muyter" <phdm@macqel.be>
- Subject: PATCH : libiberty/strtoul/ && within ||
- From: Elena Zannoni <ezannoni@cygnus.com>
- Date: Fri, 13 Aug 1999 18:27:43 -0400 (EDT)
- Cc: gdb-patches@sourceware.cygnus.com (gdb-patches@sourceware.cygnus.com)
- References: <199908131038.MAA16240@mail.macqel.be>
Could you resend this patch to
egcs-patches@cygnus.com ?
EGCS is responsible for libiberty.
Thanks
Elena
Philippe De Muyter writes:
> Symptom :
>
> gcc -c -DHAVE_CONFIG_H -g -O2 -W -Wall -I. -I/share/src/gnu/gdb-19990809/libiberty/../include /share/src/gnu/gdb-19990809/libiberty/strtoul.c
> /share/src/gnu/gdb-19990809/libiberty/strtoul.c: In function `strtoul':
> /share/src/gnu/gdb-19990809/libiberty/strtoul.c:94: warning: suggest parentheses around && within ||
>
> Possible fix :
>
> Thu Aug 12 00:11:02 1999 Philippe De Muyter <phdm@macqel.be>
>
> * strtoul (strtoul): Add parentheses around && within ||.
>
> --- ./libiberty/strtoul.c Wed Aug 11 18:42:46 1999
> +++ ./libiberty/strtoul.c Wed Aug 11 11:21:36 1999
> @@ -91,7 +91,7 @@ strtoul(nptr, endptr, base)
> break;
> if (c >= base)
> break;
> - if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim)
> + if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
> any = -1;
> else {
> any = 1;
>