Date: Sun, 22 Oct 2006 08:12:24 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Peter Grehan <grehan@freebsd.org> Cc: powerpc@freebsd.org, current@freebsd.org Subject: Re: [head tinderbox] failure on powerpc/powerpc Message-ID: <20061022051224.GA45605@deviant.kiev.zoral.com.ua> In-Reply-To: <453AD5C2.6030507@freebsd.org> References: <20061022000656.C384373068@freebsd-current.sentex.ca> <453AD5C2.6030507@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 21, 2006 at 07:21:54PM -0700, Peter Grehan wrote: > >cc -O2 -pipe -I/src/lib/libc/include -I/src/lib/libc/../../include=20 > >-I/src/lib/libc/powerpc -D__DBINTERFACE_PRIVATE=20 > >-I/src/lib/libc/../../contrib/gdtoa -DINET6 -I/obj/powerpc/src/lib/libc= =20 > >-I/src/lib/libc/resolv -DPOSIX_MISTAKE -I/src/lib/libc/locale -DBROKEN_D= ES=20 > >-DPORTMAP -DDES_BUILTIN -I/src/lib/libc/rpc -DYP -DNS_CACHING=20 > >-Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c=20 > >/src/lib/libc/stdio/xprintf.c > >/src/lib/libc/stdio/xprintf.c: In function `__v2printf': > >/src/lib/libc/stdio/xprintf.c:279: warning: passing arg 2 of=20 > >`__builtin_va_copy' discards qualifiers from pointer target type > >*** Error code 1 >=20 > I did a quick change of >=20 > va_copy(ap, ap1); >=20 > to >=20 > va_copy(ap, (va_list) ap1); >=20 > .. and ended up with: >=20 > /usr/home/grehan/freebsd/dev_head/src/lib/libc/stdio/xprintf.c: In=20 > function `__v2printf': > /usr/home/grehan/freebsd/dev_head/src/lib/libc/stdio/xprintf.c:279:=20 > error: cast specifies array type >=20 > A va_list on powerpc is a struct, but va_copy should do the right thing. >=20 > Any C language geeks out there with advice ? >=20 > later, >=20 > Peter. I think that change below shall fix it. Sorry for breakage. Index: lib/libc/stdio/xprintf.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/arch/ncvs/src/lib/libc/stdio/xprintf.c,v retrieving revision 1.4 diff -u -r1.4 xprintf.c --- lib/libc/stdio/xprintf.c 21 Oct 2006 11:49:07 -0000 1.4 +++ lib/libc/stdio/xprintf.c 22 Oct 2006 05:10:49 -0000 @@ -261,7 +261,7 @@ =20 =20 static int -__v2printf(FILE *fp, const char *fmt0, unsigned pct, const va_list ap1) +__v2printf(FILE *fp, const char *fmt0, unsigned pct, va_list ap) { struct printf_info *pi, *pil; const char *fmt; @@ -274,9 +274,7 @@ int ret =3D 0; int n; struct __printf_io io; - va_list ap; =20 - va_copy(ap, ap1); __printf_init(&io); io.fp =3D fp; =20 @@ -563,7 +561,6 @@ errx(1, "render[%c] =3D NULL", *fmt); } __printf_flush(&io); - va_end(ap); return (ret); } =20 --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFOv23C3+MBN1Mb4gRAvlwAJ466AN3zjmi9EMYEVqHlh6r9GnfQgCfU+N6 mWXd6iO9zjkkqPjEUvYi7pY= =sbwn -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061022051224.GA45605>