From owner-freebsd-current@FreeBSD.ORG Sun Oct 22 05:12:36 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17BD116A403; Sun, 22 Oct 2006 05:12:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62C5743D45; Sun, 22 Oct 2006 05:12:30 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k9M4uRZF060211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 22 Oct 2006 07:56:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id k9M5COaI073404; Sun, 22 Oct 2006 08:12:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id k9M5COsF073302; Sun, 22 Oct 2006 08:12:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 22 Oct 2006 08:12:24 +0300 From: Kostik Belousov To: Peter Grehan Message-ID: <20061022051224.GA45605@deviant.kiev.zoral.com.ua> References: <20061022000656.C384373068@freebsd-current.sentex.ca> <453AD5C2.6030507@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <453AD5C2.6030507@freebsd.org> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: powerpc@freebsd.org, current@freebsd.org Subject: Re: [head tinderbox] failure on powerpc/powerpc X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Oct 2006 05:12:36 -0000 --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--