From owner-cvs-src@FreeBSD.ORG Sun Mar 5 08:43:35 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08D3316A420; Sun, 5 Mar 2006 08:43:35 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8597843D45; Sun, 5 Mar 2006 08:43:34 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id ABB532081; Sun, 5 Mar 2006 09:43:29 +0100 (CET) X-Spam-Tests: AWL,BAYES_00,FORGED_RCVD_HELO X-Spam-Learn: ham X-Spam-Score: -2.4/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 307CE2080; Sun, 5 Mar 2006 09:43:29 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id D81BF33C1D; Sun, 5 Mar 2006 09:43:28 +0100 (CET) From: des@des.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) To: jkoshy@FreeBSD.ORG (Joseph Koshy) References: <20060304154259.8A7BE16A422@hub.freebsd.org> Date: Sun, 05 Mar 2006 09:43:28 +0100 In-Reply-To: <20060304154259.8A7BE16A422@hub.freebsd.org> (Joseph Koshy's message of "Sat, 4 Mar 2006 15:42:59 +0000 (GMT)") Message-ID: <8664mtth73.fsf@xps.des.no> User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Maxime Henrion , cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys queue.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Mar 2006 08:43:35 -0000 Joseph Koshy writes: > Maxime Henrion writes: > > Log: > > Cast the pointer to void * before casting it back to struct type * in > > STAILQ_LAST. This quiets a warning from GCC about increased required > > alignment for the cast. > Doesn't this trade a compile time warning for a runtime fault on those > architectures where alignment matters? Unless the stailq head has been corrupted, we know that the result of the expression is correctly aligned for a pointer to struct type. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no