Re: [head tinderbox] failure on sparc64/sun4v

From: Sean C. Farley <scf_at_FreeBSD.org>
Date: Tue, 4 Nov 2008 22:00:22 -0600 (CST)
On Tue, 4 Nov 2008, FreeBSD Tinderbox wrote:

*snip*

> cc -O -pipe  -DLIBC_SCCS -DINET6 -I/src/lib/libutil -I/src/lib/libutil/../libc/gen/ -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c /src/lib/libutil/gr_util.c
> cc1: warnings being treated as errors
> /src/lib/libutil/gr_util.c: In function 'gr_dup':
> /src/lib/libutil/gr_util.c:154: warning: cast increases required alignment of target type
> *** Error code 1

Does the following patch fix this warning (due to r184635) correctly?
It should align the (char **) pointer correctly within the allocated
buffer.  The (void *) cast is necessary because gcc is not able to
detect that the alignment was fixed.  Better solutions are welcome.

http://www.farley.org/freebsd/tmp/libutil.patch

Sean
-- 
scf_at_FreeBSD.org
Received on Wed Nov 05 2008 - 03:23:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:37 UTC