[head tinderbox] failure on powerpc/powerpc

Kostik Belousov kostikbel at gmail.com
Sun Oct 22 05:12:36 UTC 2006


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 
> >-I/src/lib/libc/powerpc -D__DBINTERFACE_PRIVATE 
> >-I/src/lib/libc/../../contrib/gdtoa -DINET6 -I/obj/powerpc/src/lib/libc 
> >-I/src/lib/libc/resolv -DPOSIX_MISTAKE -I/src/lib/libc/locale -DBROKEN_DES 
> >-DPORTMAP -DDES_BUILTIN -I/src/lib/libc/rpc -DYP -DNS_CACHING 
> >-Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c 
> >/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 
> >`__builtin_va_copy' discards qualifiers from pointer target type
> >*** Error code 1
> 
>  I did a quick change of
> 
>     va_copy(ap, ap1);
> 
>  to
> 
>     va_copy(ap, (va_list) ap1);
> 
>  .. and ended up with:
> 
> /usr/home/grehan/freebsd/dev_head/src/lib/libc/stdio/xprintf.c: In 
> function `__v2printf':
> /usr/home/grehan/freebsd/dev_head/src/lib/libc/stdio/xprintf.c:279: 
> error: cast specifies array type
> 
>  A va_list on powerpc is a struct, but va_copy should do the right thing.
> 
>  Any C language geeks out there with advice ?
> 
> later,
> 
> Peter.

I think that change below shall fix it.
Sorry for breakage.

Index: lib/libc/stdio/xprintf.c
===================================================================
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 @@
 
 
 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 = 0;
 	int			n;
 	struct __printf_io	io;
-	va_list			ap;
 
-	va_copy(ap, ap1);
 	__printf_init(&io);
 	io.fp = fp;
 
@@ -563,7 +561,6 @@
 			errx(1, "render[%c] = NULL", *fmt);
 	}
 	__printf_flush(&io);
-	va_end(ap);
 	return (ret);
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20061022/f651958f/attachment.pgp


More information about the freebsd-current mailing list