Date: Tue, 25 Mar 2003 12:06:48 +0100 (CET) From: Harti Brandt <brandt@fokus.fraunhofer.de> To: "Matthew N. Dodd" <mdodd@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libatm Makefile atm_addr.c cache_key.c ip_addr.c libatm.h timer.c Message-ID: <20030325120221.C19124@beagle.fokus.fraunhofer.de> In-Reply-To: <200303250429.h2P4TQnk097115@repoman.freebsd.org> References: <200303250429.h2P4TQnk097115@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 24 Mar 2003, Matthew N. Dodd wrote:
The WARNS=5 breaks sparc64. The problem is
struct atminfreq {
...
caddr_t air_buf_addr;
...
};
When casting a char * to a struct * you get a warning from gcc, that
you change the required struct alignment. You can work around this
by:
(struct foo *)(void *)ptr
better yet by getting rid of caddr_t. malloc(3) returns (void *) and
should always be max aligned to the given architecture.
harti
MND>mdodd 2003/03/24 20:29:26 PST
MND>
MND> FreeBSD src repository
MND>
MND> Modified files:
MND> lib/libatm Makefile atm_addr.c cache_key.c ip_addr.c
MND> libatm.h timer.c
MND> Log:
MND> Fix warnings.
MND>
MND> Revision Changes Path
MND> 1.5 +2 -1 src/lib/libatm/Makefile
MND> 1.9 +6 -1 src/lib/libatm/atm_addr.c
MND> 1.8 +1 -1 src/lib/libatm/cache_key.c
MND> 1.8 +7 -7 src/lib/libatm/ip_addr.c
MND> 1.6 +5 -5 src/lib/libatm/libatm.h
MND> 1.8 +4 -4 src/lib/libatm/timer.c
MND>
--
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
brandt@fokus.fraunhofer.de, harti@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030325120221.C19124>
