From owner-freebsd-current@FreeBSD.ORG Mon Oct 21 23:43:55 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 81D22133 for ; Mon, 21 Oct 2013 23:43:55 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm22-vm1.bullet.mail.bf1.yahoo.com (nm22-vm1.bullet.mail.bf1.yahoo.com [98.139.212.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1A07B2F91 for ; Mon, 21 Oct 2013 23:43:54 +0000 (UTC) Received: from [66.196.81.172] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 21 Oct 2013 23:43:47 -0000 Received: from [98.139.211.162] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 21 Oct 2013 23:43:47 -0000 Received: from [127.0.0.1] by smtp219.mail.bf1.yahoo.com with NNFMP; 21 Oct 2013 23:43:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1382399027; bh=fDdUiXuIMT5zKr92146ww+CGzAMWk9jmtGk7UcoA558=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=QRmcEgzPc6pYszCzp+6/imDGK5pOEz/EbHO8UMzXHR6hWj974yDaEiOrsc/29YaM7WCNQHfR1R1rUfKWRRo2ypSmC+8e7utIkd81UuvRH97a3R/KEIff7zS4SWM1X3rD9CrKGnqf0gnZIpsVtrDGDL+LwTYdAss9+Wp+kBPWlGU= X-Yahoo-Newman-Id: 111010.89184.bm@smtp219.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: XwN.pcQVM1lknlVUZqeRHBiFvy51n4.WLebjWLc5L8BQ9JS bJ.BZKgYa2KVPhlrY0o9eO0mhOId8XkYFZMS3CbfvBKZl_jrmirWm7DKQUoD 9v0EZ_oAXMBL.owoKJdnJIV7qxo.TFnAQZfjRBxGpoQB5d9dOQ88Hks.Hq7l zLxz.1o4fDRSBogN6dHthJHoemXEaWu_CwXzP_TbhxWwISWbeuq9UtZmoOcj L1LJ1_3dpV3jpy16ATiW31DBMComUVDo.oBRpmdahpoOGKXS2SzLNXjmrxij e9JDzbpvZss7p6iipejv7H62fSRxD64zFpsEqVeedv_kpP72rVL8cT.le9x2 VZEsqXFbGNBMNoqyUJuWfUjT9LYHzHNaP6EgMWCkkxS62Y17WAyzwhsS1gAp kSJInof4LXnWzlWtq.ozyvBvpJh.JKWOQmwk6tfdldCB9s_m8zEBmzxgJUeY X9Ds6qwpU3ENlkobwBDXpX__Ehm.ye4q5RW8y4bVgwpIQNDXPuNCAo2.iePI 34M7egOJs3uM8hbb4o7d0Rzg.U.PvgmzsPxy2FNdUYC3NzvxzB_e5FVX9VhS 6dfNcAiWt91mPlh2OeeW8znRHrnTfed410X.r0nJVBu16ogXgiA_dYec5 X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.3] (sean_bruno@96.47.64.130 with ) by smtp219.mail.bf1.yahoo.com with SMTP; 21 Oct 2013 16:43:47 -0700 PDT Subject: Re: gperf/src/options.cc -- quiesce clang warnings -Wlogical-op-parentheses From: Sean Bruno To: "freebsd-current@freebsd.org" In-Reply-To: <1382327452.2610.5.camel@localhost> References: <1382327452.2610.5.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-y8zD7hF9XmcViC+R9qTH" Date: Mon, 21 Oct 2013 19:43:46 -0400 Message-ID: <1382399026.7749.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: Matthew Fleming X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2013 23:43:55 -0000 --=-y8zD7hF9XmcViC+R9qTH Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sun, 2013-10-20 at 23:50 -0400, Sean Bruno wrote: > gperf has some clang warnings that seem to be harmless, but annoying > regarding some of the logical operations around detecting ascii chars: >=20 > c++ -O2 -pipe -I/usr/obj/usr/src/tmp/legacy/usr/include -Wno-c > ++11-extensions > -I/usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/lib > -I/usr/src/gnu/usr.bin/g > perf > -c /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/options.cc > /usr/src/gnu/usr.bin/gperf/../../../contrib/gperf/src/options.cc:284:27: > warning: '&&' within '||' [-Wlogical-op-parentheses] > if (*arg >=3D 'A' && *arg <=3D 'Z' || *arg >=3D 'a' && *arg <= =3D > 'z') > ~~~~~~~~~~~~^~~~~~~~~~~~~~ ~~ >=20 >=20 Heh, Matthew suggested the obvious in private mail, it seems that this would be better "spelled" as "isalpha" :-) Index: contrib/gperf/src/options.cc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- contrib/gperf/src/options.cc (revision 256865) +++ contrib/gperf/src/options.cc (working copy) @@ -281,7 +281,7 @@ { putchar (*arg); arg++; - if (*arg >=3D 'A' && *arg <=3D 'Z' || *arg >=3D 'a' && *arg <=3D= 'z') + if (isalpha(*arg)) { putchar (*arg); arg++; @@ -293,7 +293,7 @@ putchar (*arg); arg++; } - while (*arg >=3D 'A' && *arg <=3D 'Z' || *arg >=3D 'a' && *a= rg <=3D 'z' || *arg =3D=3D '-'); + while (isalpha(*arg) || *arg =3D=3D '-'); if (*arg =3D=3D '=3D') { putchar (*arg); --=-y8zD7hF9XmcViC+R9qTH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAABAgAGBQJSZbwyAAoJEBkJRdwI6BaHYwUH/3dNBq2V2ickWEu6bdJSJ8S+ wurz4zAX1plbWKgWPrbig6owFzEJ28D/3glzH9b1FQTqkQIOCXBY4e7YD6GG3K7x MAC82ryrem5YzLp7y/IMv0H+Cwyv7qR9pkL4fHzq4/nxRaMAEJSslgDOvxGlu++5 WZHKuoqkrWfglcTgCe5N5KFVdtpXG50kQs7p2bRPmIDKGAYHPUc9h7QgnKIqt8Va 6ihGaJMXC1pkIXxxReoLNT7czSeKPMog6/wBSS6Shtl5b7jHQfd49WKNKPdjBIYt QCGpCGSl3mqxdo1JvTnWvuq9gX2Jv2/uSbALDGwJTYiMPMeauNNq+XdaHPowqu0= =ZVph -----END PGP SIGNATURE----- --=-y8zD7hF9XmcViC+R9qTH--