Hi Eric, On Fri, Apr 29, 2011 at 09:56:08PM +0000, Eric Blake wrote: > - Log ----------------------------------------------------------------- > commit fb132bf05f993b98f8bce6dc681dd34cacc40a39 > Author: Eric Blake <ebl...@redhat.com> > Date: Fri Apr 29 15:50:31 2011 -0600 > > m4_defn: avoid compiler warning > > argc is an int, therefore by definition, it is <= INT_MAX. > > * src/builtin.c (m4_defn): Nuke redundant condition. > > Signed-off-by: Eric Blake <ebl...@redhat.com> > > ----------------------------------------------------------------------- > > diff --git a/src/builtin.c b/src/builtin.c > index 632ef79..80f2024 100644 > --- a/src/builtin.c > +++ b/src/builtin.c > @@ -894,7 +894,7 @@ m4_defn (struct obstack *obs, int argc, token_data **argv) > if (bad_argc (argv[0], argc, 2, -1)) > return; > > - assert (0 < argc && argc <= INT_MAX); > + assert (0 < argc); > for (i = 1; i < (unsigned) argc; i++) > { > const char *arg = ARG((int) i);
Since argc is immediately cast to an unsigned int, I think the test was supposed to be: assert (0 < argc && argc <= UINT_MAX); Cheers, -- Gary V. Vaughan (gary AT gnu DOT org)
pgpeVf8pqXJnt.pgp
Description: PGP signature
_______________________________________________ M4-patches mailing list M4-patches@gnu.org https://lists.gnu.org/mailman/listinfo/m4-patches