From owner-svn-src-all@FreeBSD.ORG Mon Sep 20 06:56:01 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC05D1065675; Mon, 20 Sep 2010 06:56:01 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 6C62C8FC15; Mon, 20 Sep 2010 06:56:01 +0000 (UTC) Received: from besplex.bde.org (c122-107-116-249.carlnfd1.nsw.optusnet.com.au [122.107.116.249]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o8K6tvnH003125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Sep 2010 16:55:59 +1000 Date: Mon, 20 Sep 2010 16:55:57 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Marcel Moolenaar In-Reply-To: <201009200420.o8K4KtKn026514@svn.freebsd.org> Message-ID: <20100920163758.A788@besplex.bde.org> References: <201009200420.o8K4KtKn026514@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r212886 - head/sbin/growfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2010 06:56:02 -0000 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. Bruce