From owner-svn-src-head@FreeBSD.ORG Tue Sep 21 10:24:29 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BDFC1065694; Tue, 21 Sep 2010 10:24:29 +0000 (UTC) (envelope-from prvs=18736308cf=brian@Awfulhak.org) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2BD8FC22; Tue, 21 Sep 2010 10:24:28 +0000 (UTC) Received: from pd6ml2no-ssvc.prod.shaw.ca ([10.0.153.163]) by pd5mo1no-svcs.prod.shaw.ca with ESMTP; 21 Sep 2010 04:09:26 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=Mj7okGGiyvljez8nourwAOSCyIXzraNcHEi86Qy5a+Y= c=1 sm=1 a=nwdpmwd4ttUA:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=MJPcHhXccCG8eBs0us8XwA==:17 a=PO7r1zJSAAAA:8 a=MMwg4So0AAAA:8 a=6I5d2MoRAAAA:8 a=W9iI6s1Q80laVmV6a0wA:9 a=L7jCreETJnLBE5ugy_8A:7 a=7Scn8inXKID6XUUMbpi4eBYh2kMA:4 a=CjuIK1q_8ugA:10 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO store.lan.Awfulhak.org) ([70.79.162.198]) by pd6ml2no-dmz.prod.shaw.ca with ESMTP; 21 Sep 2010 04:09:25 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 5DB51C433C1_C988455B; Tue, 21 Sep 2010 10:09:25 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id EE735C460F8_C988450F; Tue, 21 Sep 2010 10:09:20 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.4/8.14.4) with ESMTP id o8LA9KFr096704; Tue, 21 Sep 2010 03:09:20 -0700 (PDT) (envelope-from brian@Awfulhak.org) Date: Tue, 21 Sep 2010 03:09:16 -0700 From: Brian Somers To: Bruce Evans Message-ID: <20100921030916.3ee375c6@dev.lan.Awfulhak.org> In-Reply-To: <20100920163758.A788@besplex.bde.org> References: <201009200420.o8K4KtKn026514@svn.freebsd.org> <20100920163758.A788@besplex.bde.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Marcel Moolenaar , src-committers@FreeBSD.org Subject: Re: svn commit: r212886 - head/sbin/growfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2010 10:24:29 -0000 On Mon, 20 Sep 2010 16:55:57 +1000 (EST) Bruce Evans wrote: > On Mon, 20 Sep 2010, Marcel Moolenaar wrote: > > > Log: > > Unbreak the build on strong-aligned architectures (arm, ia64). > > Casting from (char *) to (struct ufs1_dinode *) changes the > > alignment requirement of the pointer and GCC does not know that > > the pointer is adequately aligned (due to malloc(3)), and warns > > about it. Cast to (void *) first to by-pass the check. > > A previous version in which the pointer (iobuf) the correct type to > begin with was better. It used to have type void *, but now has type > caddr_t (whose existence is a bug), in order to abuse caddr_t by > assuming that it is char * to do pointer arithmetic on it in 1 place > (iobuf + sblock.fs_cgsize). The 7 other places where iobuf is used > only assume that caddr_t is a pointer (or perhaps a [u]intptr_t). > > growfs has no other instances of caddr_t. Maybe iobuf ought to go back to being a void * with casting where the arithmetic happens. If it's changed, newfs/mkfs.c should probably change too. Is there some subtle difference that makes the casting ok in newfs/mkfs.c: dp1 = (struct ufs1_dinode *)(&iobuf[start]); and not ok in growfs/growfs.c r212885: dp1 = (struct ufs1_dinode *)iobuf; or is it just ignored because WARNS is 3 for newfs and is defaulted to 6 for growfs? -- Brian Somers Don't _EVER_ lose your sense of humour !