Re: cvs commit: src/lib/libatm Makefile atm_addr.c cache_key.c ip_addr.c libatm.h timer.c

From: Harti Brandt <brandt_at_fokus.fraunhofer.de>
Date: Tue, 25 Mar 2003 12:06:48 +0100 (CET)
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_at_fokus.fraunhofer.de, harti_at_freebsd.org
Received on Tue Mar 25 2003 - 03:06:54 UTC