Date: Mon, 29 Oct 2007 23:10:03 GMT From: Pietro Cerutti <gahr@gahr.ch> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/117648: [patch] devel/a2dev fix building with GCC 4.2 + get rid of a few warnings Message-ID: <200710292310.l9TNA3RI030294@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/117648; it has been noted by GNATS. From: Pietro Cerutti <gahr@gahr.ch> To: bug-followup@FreeBSD.org, gahr@gahr.ch Cc: Subject: Re: ports/117648: [patch] devel/a2dev fix building with GCC 4.2 + get rid of a few warnings Date: Tue, 30 Oct 2007 00:03:11 +0100 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig85EEADCCDEA557AB89C3646D Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Errata corrige: the previous patch didn't include ${WRCSRC} in the the path of the files to be patched. --- a2dev-1.2/util/error.c.orig 1995-03-26 05:48:05.000000000 +0200 +++ a2dev-1.2/util/error.c 2007-10-29 23:56:26.000000000 +0100 @@ -7,6 +7,7 @@ */ #include <stdio.h> +#include <stdlib.h> #include <stdarg.h> #include "util.h" #include "error.h" --- a2dev-1.2/util/hash.c.orig 1995-03-26 05:48:05.000000000 +0200 +++ a2dev-1.2/util/hash.c 2007-10-29 23:56:26.000000000 +0100 @@ -28,9 +28,13 @@ Hash(void *bytes, unsigned length) { unsigned crc =3D CRC_INIT; + unsigned char byte; + unsigned len =3D 0; - while (length--) - crc =3D table[(crc ^ *((unsigned char *) bytes)++) & 0xFF] ^ (crc >> 8= ); + for(len=3D0; len<length; len++){ + byte =3D ((unsigned char *)bytes)[len]; + crc =3D table[(crc ^ byte) & 0xFF] ^ (crc >> 8); + } return(crc ^ CRC_FINAL); } --- a2dev-1.2/util/names.c.orig 1995-03-26 05:48:05.000000000 +0200 +++ a2dev-1.2/util/names.c 2007-10-29 23:56:26.000000000 +0100 @@ -6,6 +6,7 @@ */ #include <stdio.h> +#include <string.h> #include "util.h" #include "error.h" #include "hash.h" --- a2dev-1.2/asm/emit.c.orig 1995-03-28 07:15:14.000000000 +0200 +++ a2dev-1.2/asm/emit.c 2007-10-29 23:56:26.000000000 +0100 @@ -191,7 +191,7 @@ /* Try to do zero page */ - if (zmode >=3D 0 && CheckOp(ins, zmode) >=3D 0) + if (zmode >=3D 0 && CheckOp(ins, zmode) >=3D 0) { if (ivalue->type =3D=3D iSegRel && ivalue->u.segrel.segment =3D=3D AbsSegment && (ivalue->u.segrel.offset & ~0xFF) =3D=3D 0) @@ -207,6 +207,7 @@ EmitIvalue(ivalue, FALSE, 0x01); return; } + } /* Can we ONLY do zero page (but didn't)? */ @@ -239,7 +240,7 @@ /* Compute displacement to target address */ - if (gPass =3D=3D 2) + if (gPass =3D=3D 2) { if (ivalue->type !=3D iSegRel || ivalue->u.segrel.segment !=3D gSegmen= t) uerror("illegal branch address"); else @@ -248,6 +249,7 @@ if (disp < -128 || disp > 127) uerror("branch of %d bytes is out of range", disp); } + } /* Done */ --=20 Pietro Cerutti PGP Public Key: http://gahr.ch/pgp --------------enig85EEADCCDEA557AB89C3646D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHJma0wMJqmJVx944RCqEJAJ9l5F22neCGxKV+WTcbbRS3AEVysACgnsZ6 FtMaa4wfYoBcDzJyYrrdVjg= =dmm6 -----END PGP SIGNATURE----- --------------enig85EEADCCDEA557AB89C3646D--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710292310.l9TNA3RI030294>