Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 2008 22:00:22 -0600 (CST)
From:      "Sean C. Farley" <scf@FreeBSD.org>
To:        freebsd-current@FreeBSD.org
Cc:        freebsd-sparc64@FreeBSD.org
Subject:   Re: [head tinderbox] failure on sparc64/sun4v
Message-ID:  <alpine.BSF.2.00.0811042123410.15712@thor.farley.org>
In-Reply-To: <20081105013120.8FAAF73039@freebsd-current.sentex.ca>
References:  <20081105013120.8FAAF73039@freebsd-current.sentex.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0811042123410.15712>