From owner-cvs-all@FreeBSD.ORG Tue Mar 25 03:06:54 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 174E537B401; Tue, 25 Mar 2003 03:06:54 -0800 (PST) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 365A843FBF; Tue, 25 Mar 2003 03:06:52 -0800 (PST) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h2PB6mH01986; Tue, 25 Mar 2003 12:06:48 +0100 (MET) Date: Tue, 25 Mar 2003 12:06:48 +0100 (CET) From: Harti Brandt To: "Matthew N. Dodd" In-Reply-To: <200303250429.h2P4TQnk097115@repoman.freebsd.org> Message-ID: <20030325120221.C19124@beagle.fokus.fraunhofer.de> References: <200303250429.h2P4TQnk097115@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-22.9 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: cvs-src@FreeBSD.org cc: src-committers@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 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2003 11:06:55 -0000 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