From owner-freebsd-current@FreeBSD.ORG Thu Dec 11 05:51:34 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F24C516A4CE for ; Thu, 11 Dec 2003 05:51:33 -0800 (PST) Received: from fafoe.narf.at (chello212186121237.14.vie.surfer.at [212.186.121.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DB4743D13 for ; Thu, 11 Dec 2003 05:51:32 -0800 (PST) (envelope-from stefan@fafoe.narf.at) Received: from wombat.fafoe.narf.at (wombat.fafoe.narf.at [192.168.1.42]) by fafoe.narf.at (Postfix) with ESMTP id B022F40B6; Thu, 11 Dec 2003 14:51:28 +0100 (CET) Received: by wombat.fafoe.narf.at (Postfix, from userid 1001) id A89EC1B3; Thu, 11 Dec 2003 14:51:27 +0100 (CET) Date: Thu, 11 Dec 2003 14:51:27 +0100 From: Stefan Farfeleder To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20031211135125.GA991@wombat.fafoe.narf.at> Mail-Followup-To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , andy@splashground.de, Damian Gerow , current@freebsd.org References: <20031210204642.27989.qmail@paladin.fortunaty.net> <20031211132010.2491.qmail@paladin.fortunaty.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.5.1i cc: Damian Gerow cc: andy@splashground.de cc: current@freebsd.org Subject: Re: buildworld doesn't like -O2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2003 13:51:34 -0000 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Dec 11, 2003 at 02:25:08PM +0100, Dag-Erling Smørgrav wrote: > andy@splashground.de writes: > > And in this case, as far as i can see, the code does violate the > > strict aliasing rules. > > Yes, and you are welcome to send a patch, but there was none in the > PR. PRs consisting of nothing but a compiler error message are worse > than useless. A trivial yet unbeautiful one is attached. Stefan --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pam_echo.c.diff" --- src/lib/libpam/modules/pam_echo/pam_echo.c.orig Thu Dec 11 14:44:36 2003 +++ src/lib/libpam/modules/pam_echo/pam_echo.c Thu Dec 11 14:46:24 2003 @@ -49,6 +49,7 @@ { char msg[PAM_MAX_MSG_SIZE]; const char *str, *p, *q; + const void *r; int err, i, item; size_t len; @@ -89,7 +90,9 @@ } if (item == -1) continue; - err = pam_get_item(pamh, item, (const void **)&str); + r = str; + err = pam_get_item(pamh, item, &r); + str = r; if (err != PAM_SUCCESS) return (err); if (str == NULL) --4Ckj6UjgE2iN1+kY--