Date: Thu, 11 Dec 2003 14:51:27 +0100 From: Stefan Farfeleder <stefan@fafoe.narf.at> To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no> Cc: current@freebsd.org Subject: Re: buildworld doesn't like -O2 Message-ID: <20031211135125.GA991@wombat.fafoe.narf.at> In-Reply-To: <xzpbrqfij0r.fsf@dwp.des.no> References: <20031210204642.27989.qmail@paladin.fortunaty.net> <xzpptevecd4.fsf@dwp.des.no> <20031211132010.2491.qmail@paladin.fortunaty.net> <xzpbrqfij0r.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031211135125.GA991>