From owner-freebsd-current@FreeBSD.ORG Sat Jul 14 22:09:24 2012 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAB00106566B; Sat, 14 Jul 2012 22:09:24 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id AA4AF8FC15; Sat, 14 Jul 2012 22:09:24 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 5C73A686E; Sat, 14 Jul 2012 22:09:18 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 22ECB8F29; Sun, 15 Jul 2012 00:09:18 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Justin T. Gibbs" References: Date: Sun, 15 Jul 2012 00:09:17 +0200 In-Reply-To: (Justin T. Gibbs's message of "Fri, 13 Jul 2012 16:14:17 -0600") Message-ID: <86obnif10y.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: current@FreeBSD.org Subject: Re: PAM passwdqc, strict aliasing, and WARNS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sat, 14 Jul 2012 22:09:25 -0000 "Justin T. Gibbs" writes: > Someone who has yet to confess added -Werror to the global CFLAGS > (via /etc/make.conf) for one of our systems at work. Before I > figured out that this was the cause of builds failing, I hacked up > pam_passwdc to resolve the problem. This gets the module to > WARNS=3D2, but to go farther, the "logically const" issues with this > code will need to be sorted out. > > Is this change worth committing? Is this the best way to resolve > the strict aliasing issues in this code? I really don't like that sort of game. If you look at other PAM consumer code, you'll see that the common idiom is what Jilles suggested, i.e. use a temporary variable of the appropriate type. That being said, pam_passwdqc should probably be either updated or removed. The version we have is ten years old. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no