Re: [SCM] GNU M4 source repository branch, branch-1.4, updated. v1.4.16-3-gfb132bf

"Gary V. Vaughan" <[email protected]> Sat, 30 Apr 2011 14:16:47 +0700
Newsgroups gmane.comp.gnu.m4.cvs
Message-ID <20110430071646.GB79580__29463.0267927007$1304183981$gmane$org@Moloch.local>
--4bRzO86E/ozDv8r1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Eric,

On Fri, Apr 29, 2011 at 09:56:08PM +0000, Eric Blake wrote:
> - Log -----------------------------------------------------------------
> commit fb132bf05f993b98f8bce6dc681dd34cacc40a39
> Author: Eric Blake <[email protected]>
> Date:   Fri Apr 29 15:50:31 2011 -0600
>=20
>     m4_defn: avoid compiler warning
>    =20
>     argc is an int, therefore by definition, it is <=3D INT_MAX.
>    =20
>     * src/builtin.c (m4_defn): Nuke redundant condition.
>    =20
>     Signed-off-by: Eric Blake <[email protected]>
>=20
> -----------------------------------------------------------------------
>=20
> 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;
> =20
> -  assert (0 < argc && argc <=3D INT_MAX);
> +  assert (0 < argc);
>    for (i =3D 1; i < (unsigned) argc; i++)
>      {
>        const char *arg =3D ARG((int) i);

Since argc is immediately cast to an unsigned int, I think the test was
supposed to be:

  assert (0 < argc && argc <=3D UINT_MAX);

Cheers,
--=20
Gary V. Vaughan (gary AT gnu DOT org)

--4bRzO86E/ozDv8r1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)

iEYEARECAAYFAk27t14ACgkQFRMICSmD1gZaZACgvgLynYfu/TZtcbMWBQjF4cI6
w1gAni6PW+PO83mvGespMf3fDDqE+zlB
=pwp2
-----END PGP SIGNATURE-----

--4bRzO86E/ozDv8r1--