From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 03:56:15 2011 Received: (at submit) by debbugs.gnu.org; 13 Jul 2011 07:56:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QguIp-0007AZ-As for submit@debbugs.gnu.org; Wed, 13 Jul 2011 03:56:15 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QguIm-0007AN-Qn for submit@debbugs.gnu.org; Wed, 13 Jul 2011 03:56:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QguId-0003X7-B0 for submit@debbugs.gnu.org; Wed, 13 Jul 2011 03:56:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:57839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QguIc-0003Wx-VJ for submit@debbugs.gnu.org; Wed, 13 Jul 2011 03:56:03 -0400 Received: from eggs.gnu.org ([140.186.70.92]:35866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QguIa-0003DP-Ei for bug-coreutils@gnu.org; Wed, 13 Jul 2011 03:56:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QguIY-0003Vb-Sc for bug-coreutils@gnu.org; Wed, 13 Jul 2011 03:56:00 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:57592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QguIY-0003V7-1r for bug-coreutils@gnu.org; Wed, 13 Jul 2011 03:55:58 -0400 Received: from DualCore (dsdf-4db5173c.pool.mediaWays.net [77.181.23.60]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0MfIB0-1QsOVX3Z7q-00OkTi; Wed, 13 Jul 2011 09:55:54 +0200 From: "Joachim Schmitz" To: Subject: RE: coreutils-8.12 compiler warning Date: Wed, 13 Jul 2011 09:55:51 +0200 Message-ID: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AcxBMhGJ6XSbS3N3T7Sqz9wBTfXmOA== Content-Language: de X-Provags-ID: V02:K0:MimT7U8zmW4l1jFZLfP2E+DeURq6mr1xHgduUZ3Lpef 2byi8fUpLRKvzI0itAyDcnBo35msJEsPTfmKckKWY2/y91wjSy 1zCOAy2vzFRwMaXnT1bF/3Ad2uZg19gUp4oSmR/J5fV9QdpGIm 8GGrog28BItoSXenR6562dtP+THtFjwL4eQMgLjkbYzJG97aF9 kveDMdDme8dT7C2pKLpozdehyheDdWs/leD3qrWiSQ= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.5 (-----) I found this in mktemp.c, line344 (well, my compiler found it for me and warned about 'possible use of "=" where "==" was intended'): if (!dry_run && (stdout_closed = true) && close_stream (stdout) != 0) Not sure whether this is bug or feature ;-) Bye, Jojo From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 05:07:09 2011 Received: (at 9064) by debbugs.gnu.org; 13 Jul 2011 09:07:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgvPR-0000Np-EI for submit@debbugs.gnu.org; Wed, 13 Jul 2011 05:07:09 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QgvPP-0000NN-1L for 9064@debbugs.gnu.org; Wed, 13 Jul 2011 05:07:07 -0400 Received: (qmail 61149 invoked from network); 13 Jul 2011 09:07:00 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 13 Jul 2011 09:07:00 -0000 Message-ID: <4E1D5FCB.3080904@draigBrady.com> Date: Wed, 13 Jul 2011 10:05:15 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Joachim Schmitz Subject: Re: bug#9064: coreutils-8.12 compiler warning References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> In-Reply-To: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9064 Cc: 9064@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 13/07/11 08:55, Joachim Schmitz wrote: > I found this in mktemp.c, line344 (well, my compiler found it for me and > warned about 'possible use of "=" where "==" was intended'): > > if (!dry_run && (stdout_closed = true) && close_stream (stdout) != 0) > > Not sure whether this is bug or feature ;-) Well it's a feature. We could reorganize but it would add a few more lines. What compiler (option) is this? Is the warning avoided by using double brackets like ((stdout_closed = true)) cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 05:13:16 2011 Received: (at 9064) by debbugs.gnu.org; 13 Jul 2011 09:13:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgvVL-0000W5-OG for submit@debbugs.gnu.org; Wed, 13 Jul 2011 05:13:15 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgvVI-0000Vr-Tj for 9064@debbugs.gnu.org; Wed, 13 Jul 2011 05:13:13 -0400 Received: from DualCore (dsdf-4db5173c.pool.mediaWays.net [77.181.23.60]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MgHB8-1QtWyc2J4Y-00NGD7; Wed, 13 Jul 2011 11:13:04 +0200 From: "Joachim Schmitz" To: =?iso-8859-1?Q?'P=E1draig_Brady'?= References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> In-Reply-To: <4E1D5FCB.3080904@draigBrady.com> Subject: RE: bug#9064: coreutils-8.12 compiler warning Date: Wed, 13 Jul 2011 11:13:02 +0200 Message-ID: <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJZadlsqV/0HAnR8qAQBsVub9WkTgJvQ6SCk7wrteA= Content-Language: de X-Provags-ID: V02:K0:V9adUNAwOPqTcUyi2nOQsSZ/LlLx3ACaZg5Z13i1i9E eVlMacBKYbkXJTHw2Ng7e6Zwx5WTHNg5+/0Fj107dFDgeR9BF9 w3Ji5jIE3QNEqTJXThd5uYM9JtEJx0UfnuiTUZGYlSlYV7NEzR P2aEE4bLNvx8cwoAr1sJKJfqldavGgKJuhaqwhBlKUR9ilag3N zNynq66TLJvChFTB94EjDptw8aYZT/vPeYPt1zBfsM= X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 9064 Cc: 9064@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Double backet does not fix this warning. It is the HP NonStop c89 and = c99 compiler without having disabled warnings (all warnings are on by = default) If it isn't a bug, forget about it, or maybe add a comment next to that = line about this. -----Original Message----- From: P=E1draig Brady [mailto:P@draigBrady.com]=20 Sent: Wednesday, July 13, 2011 11:05 AM To: Joachim Schmitz Cc: 9064@debbugs.gnu.org Subject: Re: bug#9064: coreutils-8.12 compiler warning On 13/07/11 08:55, Joachim Schmitz wrote: > I found this in mktemp.c, line344 (well, my compiler found it for me=20 > and warned about 'possible use of "=3D" where "=3D=3D" was intended'): >=20 > if (!dry_run && (stdout_closed =3D true) && close_stream = (stdout)=20 > !=3D 0) >=20 > Not sure whether this is bug or feature ;-) Well it's a feature. We could reorganize but it would add a few more lines. What compiler (option) is this? Is the warning avoided by using double brackets like ((stdout_closed =3D true)) cheers, P=E1draig. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 05:34:37 2011 Received: (at 9064-done) by debbugs.gnu.org; 13 Jul 2011 09:34:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qgvq1-0000zi-1l for submit@debbugs.gnu.org; Wed, 13 Jul 2011 05:34:37 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Qgvpz-0000zV-1R for 9064-done@debbugs.gnu.org; Wed, 13 Jul 2011 05:34:35 -0400 Received: (qmail 66161 invoked from network); 13 Jul 2011 09:34:28 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 13 Jul 2011 09:34:28 -0000 Message-ID: <4E1D663C.4040206@draigBrady.com> Date: Wed, 13 Jul 2011 10:32:44 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Joachim Schmitz Subject: Re: bug#9064: coreutils-8.12 compiler warning References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> In-Reply-To: <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9064-done Cc: 9064-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 13/07/11 10:13, Joachim Schmitz wrote: > Double backet does not fix this warning. It is the HP NonStop c89 and c99 > compiler without having disabled warnings (all warnings are on by default) > If it isn't a bug, forget about it, or maybe add a comment next to that line > about this. > > -----Original Message----- > From: Pádraig Brady [mailto:P@draigBrady.com] > Sent: Wednesday, July 13, 2011 11:05 AM > To: Joachim Schmitz > Cc: 9064@debbugs.gnu.org > Subject: Re: bug#9064: coreutils-8.12 compiler warning > > On 13/07/11 08:55, Joachim Schmitz wrote: >> I found this in mktemp.c, line344 (well, my compiler found it for me >> and warned about 'possible use of "=" where "==" was intended'): >> >> if (!dry_run && (stdout_closed = true) && close_stream (stdout) >> != 0) >> >> Not sure whether this is bug or feature ;-) > > Well it's a feature. > We could reorganize but it would add a few more lines. > What compiler (option) is this? > Is the warning avoided by using double brackets like ((stdout_closed = > true)) I also notice SGI's compiler has similar issues http://archive.apache.org/gnats/2528 closing this. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 06:14:05 2011 Received: (at 9064-done) by debbugs.gnu.org; 13 Jul 2011 10:14:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgwSC-0001re-CZ for submit@debbugs.gnu.org; Wed, 13 Jul 2011 06:14:04 -0400 Received: from mail216.messagelabs.com ([85.158.143.99]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QgwRt-0001qo-52 for 9064-done@debbugs.gnu.org; Wed, 13 Jul 2011 06:14:02 -0400 X-VirusChecked: Checked X-Env-Sender: bernhard.voelker@siemens-enterprise.com X-Msg-Ref: server-7.tower-216.messagelabs.com!1310552017!11412837!2 X-StarScan-Version: 6.2.17; banners=-,-,- X-Originating-IP: [62.134.46.10] Received: (qmail 25707 invoked from network); 13 Jul 2011 10:13:39 -0000 Received: from unknown (HELO senmx12-mx) (62.134.46.10) by server-7.tower-216.messagelabs.com with SMTP; 13 Jul 2011 10:13:39 -0000 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx12-mx (Server) with ESMTP id 0B32423F03E2; Wed, 13 Jul 2011 12:13:39 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.57]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Wed, 13 Jul 2011 12:12:52 +0200 From: "Voelker, Bernhard" To: =?iso-8859-1?Q?P=E1draig_Brady?= , Joachim Schmitz Date: Wed, 13 Jul 2011 12:12:49 +0200 Subject: RE: bug#9064: coreutils-8.12 compiler warning Thread-Topic: bug#9064: coreutils-8.12 compiler warning Thread-Index: AcxBQkQoMTHGii9VTve9WD7AcCoW6AAAo+cQ Message-ID: <7856072A9D04C24B82DFE2B1112FE38A08FE2149DD@MCHP058A.global-ad.net> References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> <4E1D663C.4040206@draigBrady.com> In-Reply-To: <4E1D663C.4040206@draigBrady.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 9064-done Cc: "9064-done@debbugs.gnu.org" <9064-done@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) P=E1draig Brady wrote: > On 13/07/11 10:13, Joachim Schmitz wrote: >> Double backet does not fix this warning. It is the HP NonStop c89 and c9= 9 >> compiler without having disabled warnings (all warnings are on by defaul= t) >> If it isn't a bug, forget about it, or maybe add a comment next to that = line >> about this. >>=20 >> -----Original Message----- >> From: P=E1draig Brady [mailto:P@draigBrady.com]=20 >> Sent: Wednesday, July 13, 2011 11:05 AM >> To: Joachim Schmitz >> Cc: 9064@debbugs.gnu.org >> Subject: Re: bug#9064: coreutils-8.12 compiler warning >>=20 >> On 13/07/11 08:55, Joachim Schmitz wrote: >>> I found this in mktemp.c, line344 (well, my compiler found it for me=20 >>> and warned about 'possible use of "=3D" where "=3D=3D" was intended'): >>> >>> if (!dry_run && (stdout_closed =3D true) && close_stream (stdout)= =20 >>> !=3D 0) >>> >>> Not sure whether this is bug or feature ;-) >>=20 >> Well it's a feature. >> We could reorganize but it would add a few more lines. >> What compiler (option) is this? >> Is the warning avoided by using double brackets like ((stdout_closed =3D >> true)) > > I also notice SGI's compiler has similar issues > http://archive.apache.org/gnats/2528 >=20 > closing this. I remember I've seen something like (0 !=3D (stdout_closed =3D true)) to make the compiler happy. This is like the often used if (0 =3D=3D (fp =3D fopen("file", "r")) ... error Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 06:56:46 2011 Received: (at 9064-done) by debbugs.gnu.org; 13 Jul 2011 10:56:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qgx7W-0002rd-DC for submit@debbugs.gnu.org; Wed, 13 Jul 2011 06:56:46 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qgx7U-0002rQ-19 for 9064-done@debbugs.gnu.org; Wed, 13 Jul 2011 06:56:44 -0400 Received: from DualCore (dsdf-4db5173c.pool.mediaWays.net [77.181.23.60]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0Lxfpr-1RaEV401vf-017Ben; Wed, 13 Jul 2011 12:56:21 +0200 From: "Joachim Schmitz" To: "'Voelker, Bernhard'" , =?iso-8859-1?Q?'P=E1draig_Brady'?= References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> <4E1D663C.4040206@draigBrady.com> <7856072A9D04C24B82DFE2B1112FE38A08FE2149DD@MCHP058A.global-ad.net> In-Reply-To: <7856072A9D04C24B82DFE2B1112FE38A08FE2149DD@MCHP058A.global-ad.net> Subject: RE: bug#9064: coreutils-8.12 compiler warning Date: Wed, 13 Jul 2011 12:56:18 +0200 Message-ID: <001401cc414b$7f06b380$7d141a80$@schmitz-digital.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJZadlsqV/0HAnR8qAQBsVub9WkTgJvQ6SCAW8FinoBpTi7DQGAwXisk5egqXA= Content-Language: de X-Provags-ID: V02:K0:cPT8B4mrgdKDL1Wb3a6av1ixkJab+t1S9mhs1dqxG9M TBQ8JUQmubFFObouCehApy5VvgMCmsRU8TNUbD0vi5qkomFUd7 pWeMyuCGr28ORpi/x9bInfil6kKTOoErEwfsNdq8166OOROLl6 RQuOdC0q5JZYxCvxE1TEAgDQ/z0JQaurfaAAOf8MEV3CA3gOc1 ybbnoRwTdC/QnYYfn7ysoguyqfwIxf3c5Ywv4u+igY= X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 9064-done Cc: 9064-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) From: Voelker, Bernhard >I remember I've seen something like (0 != (stdout_closed = true)) to make the compiler happy. Yes, that change would make my compiler happy too. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 08:59:31 2011 Received: (at 9064-done) by debbugs.gnu.org; 13 Jul 2011 12:59:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qgz2I-0006RT-D3 for submit@debbugs.gnu.org; Wed, 13 Jul 2011 08:59:30 -0400 Received: from mail27.messagelabs.com ([193.109.254.147]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Qgz2F-0006RH-Oe for 9064-done@debbugs.gnu.org; Wed, 13 Jul 2011 08:59:28 -0400 X-VirusChecked: Checked X-Env-Sender: bernhard.voelker@siemens-enterprise.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1310561957!41088727!1 X-StarScan-Version: 6.2.17; banners=-,-,- X-Originating-IP: [62.134.46.9] Received: (qmail 6655 invoked from network); 13 Jul 2011 12:59:17 -0000 Received: from unknown (HELO senmx11-mx) (62.134.46.9) by server-15.tower-27.messagelabs.com with SMTP; 13 Jul 2011 12:59:17 -0000 Received: from MCHP063A.global-ad.net (unknown [172.29.37.61]) by senmx11-mx (Server) with ESMTP id A7FF51EB83FF; Wed, 13 Jul 2011 14:59:21 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.57]) by MCHP063A.global-ad.net ([172.29.37.61]) with mapi; Wed, 13 Jul 2011 14:59:15 +0200 From: "Voelker, Bernhard" To: Joachim Schmitz , =?iso-8859-1?Q?=27P=E1draig_Brady=27?= Date: Wed, 13 Jul 2011 14:59:14 +0200 Subject: RE: bug#9064: [PATCH] coreutils-8.12 compiler warning Thread-Topic: bug#9064: [PATCH] coreutils-8.12 compiler warning Thread-Index: AQJZadlsqV/0HAnR8qAQBsVub9WkTgJvQ6SCAW8FinoBpTi7DQGAwXisk5egqXCAACDTQA== Message-ID: <7856072A9D04C24B82DFE2B1112FE38A08FE214B28@MCHP058A.global-ad.net> References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> <4E1D663C.4040206@draigBrady.com> <7856072A9D04C24B82DFE2B1112FE38A08FE2149DD@MCHP058A.global-ad.net> <001401cc414b$7f06b380$7d141a80$@schmitz-digital.de> In-Reply-To: <001401cc414b$7f06b380$7d141a80$@schmitz-digital.de> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 9064-done Cc: "9064-done@debbugs.gnu.org" <9064-done@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) Joachim Schmitz wrote: > From: Voelker, Bernhard=20 >> I remember I've seen something like (0 !=3D (stdout_closed =3D true)) to= make >> the compiler happy. >=20 > Yes, that change would make my compiler happy too. A search using `find . -type f -name '*.c' | xargs grep ' if .* =3D '` unveiled a second place in stat.c. Here's a corresponding patch to avoid both warnings. >From cef2afe553f821f2eb716b90623581e790ce67a3 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Wed, 13 Jul 2011 14:50:38 +0200 Subject: [PATCH] maint: fix warning 'possible use of "=3D" where "=3D=3D" w= as intended' * src/mktemp.c: avoid warning by enclosing in double brackets and comparison "!=3D 0". * src/stat.c: Likewise. --- src/mktemp.c | 2 +- src/stat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mktemp.c b/src/mktemp.c index c6d0e58..c2ab025 100644 --- a/src/mktemp.c +++ b/src/mktemp.c @@ -341,7 +341,7 @@ main (int argc, char **argv) puts (dest_name); /* If we created a file, but then failed to output the file name, we should clean up the mess before failing. */ - if (!dry_run && (stdout_closed =3D true) && close_stream (stdout) != =3D 0) + if (!dry_run && ((stdout_closed =3D true) !=3D 0) && close_stream (s= tdout) !=3D 0) { int saved_errno =3D errno; remove (dest_name); diff --git a/src/stat.c b/src/stat.c index 0ad465e..bd60457 100644 --- a/src/stat.c +++ b/src/stat.c @@ -834,7 +834,7 @@ out_mount_point (char const *filename, char *pformat, s= ize_t prefix_len, Note we don't detect if any of the directory components are bind mounted to the same device, but that's OK since we've not directly queried them. */ - if ((mp =3D find_mount_point (filename, statp))) + if ((mp =3D find_mount_point (filename, statp)) !=3D 0) { /* This dir might be bind mounted to another device, so we resolve the bound source in that case also. */ --=20 1.7.5.1 Have a nice day, Berny From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 09:11:39 2011 Received: (at 9064) by debbugs.gnu.org; 13 Jul 2011 13:11:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgzDz-0006jL-68 for submit@debbugs.gnu.org; Wed, 13 Jul 2011 09:11:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgzDt-0006it-A2 for 9064@debbugs.gnu.org; Wed, 13 Jul 2011 09:11:33 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6DDBNNg005757 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Jul 2011 09:11:23 -0400 Received: from [10.3.113.149] (ovpn-113-149.phx2.redhat.com [10.3.113.149]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6DDBM93024600; Wed, 13 Jul 2011 09:11:23 -0400 Message-ID: <4E1D997A.5090702@redhat.com> Date: Wed, 13 Jul 2011 07:11:22 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11 MIME-Version: 1.0 To: =?ISO-8859-1?Q?P=E1draig_Brady?= Subject: Re: bug#9064: coreutils-8.12 compiler warning References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> In-Reply-To: <4E1D5FCB.3080904@draigBrady.com> X-Enigmail-Version: 1.1.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigCE8CCC5F3D33BAF92845253A" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 9064 Cc: Joachim Schmitz , 9064@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCE8CCC5F3D33BAF92845253A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 07/13/2011 03:05 AM, P=E1draig Brady wrote: > On 13/07/11 08:55, Joachim Schmitz wrote: >> I found this in mktemp.c, line344 (well, my compiler found it for me a= nd >> warned about 'possible use of "=3D" where "=3D=3D" was intended'): >> >> if (!dry_run && (stdout_closed =3D true) && close_stream (stdout= ) !=3D 0) >> >> Not sure whether this is bug or feature ;-) >=20 > Well it's a feature. > We could reorganize but it would add a few more lines. Does this avoid the warning? if (!dry_run && ((stdout_closed =3D true), close_stream (stdout) !=3D 0))= That is, using the comma operator rather than an always-true conditional since we always want the assignment to occur at that part of the expressi= on? --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigCE8CCC5F3D33BAF92845253A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJOHZl6AAoJEKeha0olJ0Nq/IcIAIRcVQDItOvZJweCXKnEIqUJ pIT9MfrJr8JCJdBr2rbNh2qJvCj2pW0ZJu4C9h3Sisx8ab8yDaYxgXhqEOA02pzJ nyFGPSqV5IxUOjXVTem8+N82PaEW+vKdc0MXIYlcbR5WGm+ORonqITSvZi8Ap9IV mIpDWem/fhqbpis/Ie/qWvX+Bl84ugv5ZWoRE8UQwb8ZQIjGTDuI0+E25lkRY/Sr ti+dyllZQO/3aYpKPh/o8kJEveD+C7XtleHY9soJxhn61E5ZmEXPRtq5cF6A6Vev phDprMNPabus45nA1HTAFIvj2S60LWVvhMPXKDQPsGJ2yrEofjJsxTNJCM+jXeE= =qfNz -----END PGP SIGNATURE----- --------------enigCE8CCC5F3D33BAF92845253A-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 09:11:27 2011 Received: (at 9064-done) by debbugs.gnu.org; 13 Jul 2011 13:11:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgzDq-0006j3-QQ for submit@debbugs.gnu.org; Wed, 13 Jul 2011 09:11:27 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QgzDo-0006im-Ed for 9064-done@debbugs.gnu.org; Wed, 13 Jul 2011 09:11:25 -0400 Received: (qmail 6117 invoked from network); 13 Jul 2011 13:11:18 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 13 Jul 2011 13:11:18 -0000 Message-ID: <4E1D990D.2010008@draigBrady.com> Date: Wed, 13 Jul 2011 14:09:33 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: "Voelker, Bernhard" Subject: Re: bug#9064: [PATCH] coreutils-8.12 compiler warning References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> <4E1D663C.4040206@draigBrady.com> <7856072A9D04C24B82DFE2B1112FE38A08FE2149DD@MCHP058A.global-ad.net> <001401cc414b$7f06b380$7d141a80$@schmitz-digital.de> <7856072A9D04C24B82DFE2B1112FE38A08FE214B28@MCHP058A.global-ad.net> In-Reply-To: <7856072A9D04C24B82DFE2B1112FE38A08FE214B28@MCHP058A.global-ad.net> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9064-done Cc: Joachim Schmitz , "9064-done@debbugs.gnu.org" <9064-done@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 13/07/11 13:59, Voelker, Bernhard wrote: > Joachim Schmitz wrote: > >> From: Voelker, Bernhard >>> I remember I've seen something like (0 != (stdout_closed = true)) to make >>> the compiler happy. >> >> Yes, that change would make my compiler happy too. > > A search using `find . -type f -name '*.c' | xargs grep ' if .* = '` > unveiled a second place in stat.c. > Here's a corresponding patch to avoid both warnings. > > >>>From cef2afe553f821f2eb716b90623581e790ce67a3 Mon Sep 17 00:00:00 2001 > From: Bernhard Voelker > Date: Wed, 13 Jul 2011 14:50:38 +0200 > Subject: [PATCH] maint: fix warning 'possible use of "=" where "==" was > intended' > > * src/mktemp.c: avoid warning by enclosing in double brackets > and comparison "!= 0". > * src/stat.c: Likewise. > --- > src/mktemp.c | 2 +- > src/stat.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mktemp.c b/src/mktemp.c > index c6d0e58..c2ab025 100644 > --- a/src/mktemp.c > +++ b/src/mktemp.c > @@ -341,7 +341,7 @@ main (int argc, char **argv) > puts (dest_name); > /* If we created a file, but then failed to output the file > name, we should clean up the mess before failing. */ > - if (!dry_run && (stdout_closed = true) && close_stream (stdout) != 0) > + if (!dry_run && ((stdout_closed = true) != 0) && close_stream (stdout) != 0) > { > int saved_errno = errno; > remove (dest_name); > diff --git a/src/stat.c b/src/stat.c > index 0ad465e..bd60457 100644 > --- a/src/stat.c > +++ b/src/stat.c > @@ -834,7 +834,7 @@ out_mount_point (char const *filename, char *pformat, size_t prefix_len, > Note we don't detect if any of the directory components > are bind mounted to the same device, but that's OK > since we've not directly queried them. */ > - if ((mp = find_mount_point (filename, statp))) > + if ((mp = find_mount_point (filename, statp)) != 0) > { > /* This dir might be bind mounted to another device, > so we resolve the bound source in that case also. */ That would be slightly mangling the code to avoid a _warning_ on old buggy compilers. I'm 60:40 against adding that. cheers, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 09:22:53 2011 Received: (at 9064-done) by debbugs.gnu.org; 13 Jul 2011 13:22:54 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgzOv-0007ou-Dm for submit@debbugs.gnu.org; Wed, 13 Jul 2011 09:22:53 -0400 Received: from mail27.messagelabs.com ([193.109.254.147]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QgzOt-0007oi-9p for 9064-done@debbugs.gnu.org; Wed, 13 Jul 2011 09:22:52 -0400 X-VirusChecked: Checked X-Env-Sender: bernhard.voelker@siemens-enterprise.com X-Msg-Ref: server-7.tower-27.messagelabs.com!1310563350!40980600!2 X-StarScan-Version: 6.2.17; banners=-,-,- X-Originating-IP: [62.134.46.9] Received: (qmail 12356 invoked from network); 13 Jul 2011 13:22:31 -0000 Received: from unknown (HELO senmx11-mx) (62.134.46.9) by server-7.tower-27.messagelabs.com with SMTP; 13 Jul 2011 13:22:31 -0000 Received: from MCHP063A.global-ad.net (unknown [172.29.37.61]) by senmx11-mx (Server) with ESMTP id E16AF1EB83FC; Wed, 13 Jul 2011 15:22:44 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.57]) by MCHP063A.global-ad.net ([172.29.37.61]) with mapi; Wed, 13 Jul 2011 15:22:16 +0200 From: "Voelker, Bernhard" To: =?iso-8859-1?Q?P=E1draig_Brady?= Date: Wed, 13 Jul 2011 15:22:13 +0200 Subject: RE: bug#9064: [PATCH] coreutils-8.12 compiler warning Thread-Topic: bug#9064: [PATCH] coreutils-8.12 compiler warning Thread-Index: AcxBXlssxXOqWOQSSDGmhvpFXriYuwAAGKnQ Message-ID: <7856072A9D04C24B82DFE2B1112FE38A08FE214B54@MCHP058A.global-ad.net> References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> <4E1D663C.4040206@draigBrady.com> <7856072A9D04C24B82DFE2B1112FE38A08FE2149DD@MCHP058A.global-ad.net> <001401cc414b$7f06b380$7d141a80$@schmitz-digital.de> <7856072A9D04C24B82DFE2B1112FE38A08FE214B28@MCHP058A.global-ad.net> <4E1D990D.2010008@draigBrady.com> In-Reply-To: <4E1D990D.2010008@draigBrady.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 9064-done Cc: Joachim Schmitz , "9064-done@debbugs.gnu.org" <9064-done@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) P=E1draig Brady wrote: > On 13/07/11 13:59, Voelker, Bernhard wrote: >> Joachim Schmitz wrote: >>=20 >>> From: Voelker, Bernhard=20 >>>> I remember I've seen something like (0 !=3D (stdout_closed =3D true)) = to make >>>> the compiler happy. >>> >>> Yes, that change would make my compiler happy too. >>=20 >> A search using `find . -type f -name '*.c' | xargs grep ' if .* =3D '` >> unveiled a second place in stat.c. >> Here's a corresponding patch to avoid both warnings. >>=20 >>=20 >>>>From cef2afe553f821f2eb716b90623581e790ce67a3 Mon Sep 17 00:00:00 2001 >> From: Bernhard Voelker >> Date: Wed, 13 Jul 2011 14:50:38 +0200 >> Subject: [PATCH] maint: fix warning 'possible use of "=3D" where "=3D=3D= " was >> intended' >>=20 >> * src/mktemp.c: avoid warning by enclosing in double brackets >> and comparison "!=3D 0". >> * src/stat.c: Likewise. >> --- >> src/mktemp.c | 2 +- >> src/stat.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >>=20 >> diff --git a/src/mktemp.c b/src/mktemp.c >> index c6d0e58..c2ab025 100644 >> --- a/src/mktemp.c >> +++ b/src/mktemp.c >> @@ -341,7 +341,7 @@ main (int argc, char **argv) >> puts (dest_name); >> /* If we created a file, but then failed to output the file >> name, we should clean up the mess before failing. */ >> - if (!dry_run && (stdout_closed =3D true) && close_stream (stdout)= !=3D 0) >> + if (!dry_run && ((stdout_closed =3D true) !=3D 0) && close_stream= (stdout) !=3D 0) >> { >> int saved_errno =3D errno; >> remove (dest_name); >> diff --git a/src/stat.c b/src/stat.c >> index 0ad465e..bd60457 100644 >> --- a/src/stat.c >> +++ b/src/stat.c >> @@ -834,7 +834,7 @@ out_mount_point (char const *filename, char *pformat= , size_t prefix_len, >> Note we don't detect if any of the directory components >> are bind mounted to the same device, but that's OK >> since we've not directly queried them. */ >> - if ((mp =3D find_mount_point (filename, statp))) >> + if ((mp =3D find_mount_point (filename, statp)) !=3D 0) >> { >> /* This dir might be bind mounted to another device, >> so we resolve the bound source in that case also. */ > > > That would be slightly mangling the code to avoid a _warning_ > on old buggy compilers. well, my intension was not to satisfy the compiler primarily, but IMO it enhances readability: it proves that the developer did intensionally use '=3D' instead of '=3D=3D' ... at least in the first case. In the second, there were already double brackets, but I thought it'd make also that one clearer. Also think about Joachim's words: >>>>> Not sure whether this is bug or feature ;-) Have a nice day, Berny= From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 09:48:21 2011 Received: (at 9064) by debbugs.gnu.org; 13 Jul 2011 13:48:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgznU-0000pw-Qt for submit@debbugs.gnu.org; Wed, 13 Jul 2011 09:48:20 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgznP-0000pf-8d for 9064@debbugs.gnu.org; Wed, 13 Jul 2011 09:48:15 -0400 Received: from DualCore (dsdf-4db5173c.pool.mediaWays.net [77.181.23.60]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MCwZH-1Qq2DY0YRH-009FYS; Wed, 13 Jul 2011 15:48:03 +0200 From: "Joachim Schmitz" To: "'Eric Blake'" , =?iso-8859-1?Q?'P=E1draig_Brady'?= References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <4E1D997A.5090702@redhat.com> In-Reply-To: <4E1D997A.5090702@redhat.com> Subject: RE: bug#9064: coreutils-8.12 compiler warning Date: Wed, 13 Jul 2011 15:48:00 +0200 Message-ID: <001d01cc4163$7b43a420$71caec60$@schmitz-digital.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJZadlsqV/0HAnR8qAQBsVub9WkTgJvQ6SCApv1U6WTp5lTYA== Content-Language: de X-Provags-ID: V02:K0:hF52Bk3sFdP8N95QVQGDtzl5URRZH9xy2EUz+P/tiEk d/AcC68zTjtXCm8dHTd5ci1Qee2XSWEvNflaD7HPLidFurnoZd Gb/AWIHHNaGnB9FhmsW/qQH+Q6iSA6EfsmW9dw2uMRoThDxNxD 1GKqc4kb9J/wauw3bxYGrmN0Va8nYmTMSQgbAX+CrP5Z5WdSqD NGNbDUspzL5XKa6lttF7XDDMQvmw+Y0cOEzyPpl4oE= X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 9064 Cc: 9064@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.2 (---) That does indeed silence my compiler and is showing the intention pretty clear -----Original Message----- From: Eric Blake [mailto:eblake@redhat.com]=20 Sent: Wednesday, July 13, 2011 3:11 PM To: P=E1draig Brady Cc: Joachim Schmitz; 9064@debbugs.gnu.org Subject: Re: bug#9064: coreutils-8.12 compiler warning On 07/13/2011 03:05 AM, P=E1draig Brady wrote: > On 13/07/11 08:55, Joachim Schmitz wrote: >> I found this in mktemp.c, line344 (well, my compiler found it for me=20 >> and warned about 'possible use of "=3D" where "=3D=3D" was = intended'): >> >> if (!dry_run && (stdout_closed =3D true) && close_stream = (stdout)=20 >> !=3D 0) >> >> Not sure whether this is bug or feature ;-) >=20 > Well it's a feature. > We could reorganize but it would add a few more lines. Does this avoid the warning? if (!dry_run && ((stdout_closed =3D true), close_stream (stdout) !=3D = 0)) That is, using the comma operator rather than an always-true conditional since we always want the assignment to occur at that part of the = expression? --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 09:48:22 2011 Received: (at 9064-done) by debbugs.gnu.org; 13 Jul 2011 13:48:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgznZ-0000q6-1k for submit@debbugs.gnu.org; Wed, 13 Jul 2011 09:48:21 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgznT-0000pm-QK for 9064-done@debbugs.gnu.org; Wed, 13 Jul 2011 09:48:16 -0400 Received: from DualCore (dsdf-4db5173c.pool.mediaWays.net [77.181.23.60]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0LkSV9-1RE8gc1OLT-00bkVc; Wed, 13 Jul 2011 15:48:09 +0200 From: "Joachim Schmitz" To: =?iso-8859-1?Q?'P=E1draig_Brady'?= , "'Voelker, Bernhard'" References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <000e01cc413d$11c5fbe0$3551f3a0$@schmitz-digital.de> <4E1D663C.4040206@draigBrady.com> <7856072A9D04C24B82DFE2B1112FE38A08FE2149DD@MCHP058A.global-ad.net> <001401cc414b$7f06b380$7d141a80$@schmitz-digital.de> <7856072A9D04C24B82DFE2B1112FE38A08FE214B28@MCHP058A.global-ad.net> <4E1D990D.2010008@draigBrady.com> In-Reply-To: <4E1D990D.2010008@draigBrady.com> Subject: RE: bug#9064: [PATCH] coreutils-8.12 compiler warning Date: Wed, 13 Jul 2011 15:48:06 +0200 Message-ID: <001e01cc4163$7efd50c0$7cf7f240$@schmitz-digital.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJZadlsqV/0HAnR8qAQBsVub9WkTgJvQ6SCAW8FinoBpTi7DQGAwXisAKtUwH8C7ScvGgI/qccHk2kPP+A= Content-Language: de X-Provags-ID: V02:K0:qvUebmjD6rhA6fhQD2ZyGsa/ILsbGx08UTxM0pHgEjh hhaCA4joNWOm0sW7BHUQfNbg6aVGEu7j0B4Lyhf29OPl1OuvbA yoqtYcDPlVpgGk9r/N+eo54coD+0XJUSq+7YKARMPqZonJn+UI FPgvwMJhhcxtUDIu2GJ9GiHfZA/cC8Mwg4Ror8pfo/qKr4IIIE 2NXfvHQbWU7+czhmccYBMRn9LJJ/tAXj3TrvOsHAkE= X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 9064-done Cc: 9064-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) That c99 compiler is pretty new, about 1/2 year. -----Original Message----- From: P=E1draig Brady [mailto:P@draigBrady.com]=20 Sent: Wednesday, July 13, 2011 3:10 PM To: Voelker, Bernhard Cc: Joachim Schmitz; 9064-done@debbugs.gnu.org Subject: Re: bug#9064: [PATCH] coreutils-8.12 compiler warning On 13/07/11 13:59, Voelker, Bernhard wrote: > Joachim Schmitz wrote: >=20 >> From: Voelker, Bernhard >>> I remember I've seen something like (0 !=3D (stdout_closed =3D = true)) to=20 >>> make the compiler happy. >> >> Yes, that change would make my compiler happy too. >=20 > A search using `find . -type f -name '*.c' | xargs grep ' if .* =3D '` = > unveiled a second place in stat.c. > Here's a corresponding patch to avoid both warnings. >=20 >=20 >>>From cef2afe553f821f2eb716b90623581e790ce67a3 Mon Sep 17 00:00:00 2001 > From: Bernhard Voelker > Date: Wed, 13 Jul 2011 14:50:38 +0200 > Subject: [PATCH] maint: fix warning 'possible use of "=3D" where = "=3D=3D"=20 > was intended' >=20 > * src/mktemp.c: avoid warning by enclosing in double brackets > and comparison "!=3D 0". > * src/stat.c: Likewise. > --- > src/mktemp.c | 2 +- > src/stat.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/src/mktemp.c b/src/mktemp.c index c6d0e58..c2ab025 100644 > --- a/src/mktemp.c > +++ b/src/mktemp.c > @@ -341,7 +341,7 @@ main (int argc, char **argv) > puts (dest_name); > /* If we created a file, but then failed to output the file > name, we should clean up the mess before failing. */ > - if (!dry_run && (stdout_closed =3D true) && close_stream = (stdout) !=3D 0) > + if (!dry_run && ((stdout_closed =3D true) !=3D 0) && = close_stream=20 > + (stdout) !=3D 0) > { > int saved_errno =3D errno; > remove (dest_name); > diff --git a/src/stat.c b/src/stat.c > index 0ad465e..bd60457 100644 > --- a/src/stat.c > +++ b/src/stat.c > @@ -834,7 +834,7 @@ out_mount_point (char const *filename, char = *pformat, size_t prefix_len, > Note we don't detect if any of the directory components > are bind mounted to the same device, but that's OK > since we've not directly queried them. */ > - if ((mp =3D find_mount_point (filename, statp))) > + if ((mp =3D find_mount_point (filename, statp)) !=3D 0) > { > /* This dir might be bind mounted to another device, > so we resolve the bound source in that case also. */ That would be slightly mangling the code to avoid a _warning_ on old = buggy compilers. I'm 60:40 against adding that. cheers, P=E1draig. From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 10:20:33 2011 Received: (at 9064) by debbugs.gnu.org; 13 Jul 2011 14:20:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qh0Ij-0003Ye-FM for submit@debbugs.gnu.org; Wed, 13 Jul 2011 10:20:33 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Qh0Ih-0003YR-Ke for 9064@debbugs.gnu.org; Wed, 13 Jul 2011 10:20:32 -0400 Received: (qmail 20817 invoked from network); 13 Jul 2011 14:20:25 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 13 Jul 2011 14:20:25 -0000 Message-ID: <4E1DA940.9070700@draigBrady.com> Date: Wed, 13 Jul 2011 15:18:40 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Eric Blake Subject: Re: bug#9064: coreutils-8.12 compiler warning References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <4E1D997A.5090702@redhat.com> In-Reply-To: <4E1D997A.5090702@redhat.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9064 Cc: Joachim Schmitz , 9064@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 13/07/11 14:11, Eric Blake wrote: > On 07/13/2011 03:05 AM, Pádraig Brady wrote: >> On 13/07/11 08:55, Joachim Schmitz wrote: >>> I found this in mktemp.c, line344 (well, my compiler found it for me and >>> warned about 'possible use of "=" where "==" was intended'): >>> >>> if (!dry_run && (stdout_closed = true) && close_stream (stdout) != 0) >>> >>> Not sure whether this is bug or feature ;-) >> >> Well it's a feature. >> We could reorganize but it would add a few more lines. > > Does this avoid the warning? > > if (!dry_run && ((stdout_closed = true), close_stream (stdout) != 0)) > > That is, using the comma operator rather than an always-true conditional > since we always want the assignment to occur at that part of the expression? +1 for this version From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 03:38:38 2011 Received: (at 9064) by debbugs.gnu.org; 14 Jul 2011 07:38:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhGVH-0000kq-1m for submit@debbugs.gnu.org; Thu, 14 Jul 2011 03:38:38 -0400 Received: from mail27.messagelabs.com ([193.109.254.147]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QhGVA-0000kY-Qw for 9064@debbugs.gnu.org; Thu, 14 Jul 2011 03:38:33 -0400 X-VirusChecked: Checked X-Env-Sender: bernhard.voelker@siemens-enterprise.com X-Msg-Ref: server-4.tower-27.messagelabs.com!1310629092!35290109!1 X-StarScan-Version: 6.2.17; banners=-,-,- X-Originating-IP: [62.134.46.9] Received: (qmail 25188 invoked from network); 14 Jul 2011 07:38:12 -0000 Received: from unknown (HELO senmx11-mx) (62.134.46.9) by server-4.tower-27.messagelabs.com with SMTP; 14 Jul 2011 07:38:12 -0000 Received: from MCHP064A.global-ad.net (unknown [172.29.37.63]) by senmx11-mx (Server) with ESMTP id 5CB641EB83ED; Thu, 14 Jul 2011 09:38:22 +0200 (CEST) Received: from MCHP058A.global-ad.net ([172.29.37.57]) by MCHP064A.global-ad.net ([172.29.37.63]) with mapi; Thu, 14 Jul 2011 09:38:22 +0200 From: "Voelker, Bernhard" To: =?iso-8859-1?Q?P=E1draig_Brady?= , Eric Blake Date: Thu, 14 Jul 2011 09:38:21 +0200 Subject: RE: bug#9064: [PATCH] coreutils-8.12 compiler warning Thread-Topic: bug#9064: [PATCH] coreutils-8.12 compiler warning Thread-Index: AcxBaJx4Klc779q7RTe0hx5m6yb+VQAj308Q Message-ID: <7856072A9D04C24B82DFE2B1112FE38A08FE214E33@MCHP058A.global-ad.net> References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <4E1D997A.5090702@redhat.com> <4E1DA940.9070700@draigBrady.com> In-Reply-To: <4E1DA940.9070700@draigBrady.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 9064 Cc: Joachim Schmitz , "9064@debbugs.gnu.org" <9064@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) P=E1draig Brady wrote: >On 13/07/11 14:11, Eric Blake wrote: >> On 07/13/2011 03:05 AM, P=E1draig Brady wrote: >>> On 13/07/11 08:55, Joachim Schmitz wrote: >>>> I found this in mktemp.c, line344 (well, my compiler found it for me a= nd >>>> warned about 'possible use of "=3D" where "=3D=3D" was intended'): >>>> >>>> if (!dry_run && (stdout_closed =3D true) && close_stream (stdout= ) !=3D 0) >>>> >>>> Not sure whether this is bug or feature ;-) >>> >>> Well it's a feature. >>> We could reorganize but it would add a few more lines. >>=20 >> Does this avoid the warning? >>=20 >> if (!dry_run && ((stdout_closed =3D true), close_stream (stdout) !=3D 0)= ) >>=20 >> That is, using the comma operator rather than an always-true conditional >> since we always want the assignment to occur at that part of the express= ion? > > +1 for this version As Joachim wrote (off-ML) that his compiler didn't complain about the other, similar place in src/stat.c, the following patch doesn't touch that one (as my first patch did: http://debbugs.gnu.org/9064#19). >From 2fc0d6282d304a76241eb66f0f0627fb189e3ec9 Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Thu, 14 Jul 2011 09:19:55 +0200 Subject: [PATCH] maint: fix warning 'possible use of "=3D" where "=3D=3D" w= as intended' * src/mktemp.c: maint: avoid warning by using the comma operator rather than an always-true conditional (as suggested by Eric Blake). Reported by Joachim Schmitz in http://debbugs.gnu.org/9064. --- src/mktemp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mktemp.c b/src/mktemp.c index 2fe22b7..e592176 100644 --- a/src/mktemp.c +++ b/src/mktemp.c @@ -344,7 +344,7 @@ main (int argc, char **argv) puts (dest_name); /* If we created a file, but then failed to output the file name, we should clean up the mess before failing. */ - if (!dry_run && (stdout_closed =3D true) && close_stream (stdout) != =3D 0) + if (!dry_run && ((stdout_closed =3D true), close_stream (stdout) != =3D 0)) { int saved_errno =3D errno; remove (dest_name); --=20 1.7.5.1 Have a nice day, Berny= From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 07:01:39 2011 Received: (at 9064) by debbugs.gnu.org; 14 Jul 2011 11:01:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhJfm-0005Gw-Ps for submit@debbugs.gnu.org; Thu, 14 Jul 2011 07:01:39 -0400 Received: from mail1.slb.deg.dub.stisp.net ([84.203.253.98]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QhJfj-0005Gj-Ew for 9064@debbugs.gnu.org; Thu, 14 Jul 2011 07:01:36 -0400 Received: (qmail 88492 invoked from network); 14 Jul 2011 11:01:28 -0000 Received: from unknown (HELO ?192.168.2.25?) (84.203.137.218) by mail1.slb.deg.dub.stisp.net with SMTP; 14 Jul 2011 11:01:28 -0000 Message-ID: <4E1ECC1B.6020102@draigBrady.com> Date: Thu, 14 Jul 2011 11:59:39 +0100 From: =?ISO-8859-1?Q?P=E1draig_Brady?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: "Voelker, Bernhard" Subject: Re: bug#9064: [PATCH] coreutils-8.12 compiler warning References: <000d01cc4132$49cc7c90$dd6575b0$@schmitz-digital.de> <4E1D5FCB.3080904@draigBrady.com> <4E1D997A.5090702@redhat.com> <4E1DA940.9070700@draigBrady.com> <7856072A9D04C24B82DFE2B1112FE38A08FE214E33@MCHP058A.global-ad.net> In-Reply-To: <7856072A9D04C24B82DFE2B1112FE38A08FE214E33@MCHP058A.global-ad.net> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9064 Cc: Joachim Schmitz , Eric Blake , "9064@debbugs.gnu.org" <9064@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 14/07/11 08:38, Voelker, Bernhard wrote: > * src/mktemp.c: maint: avoid warning by using the comma operator > rather than an always-true conditional (as suggested by Eric Blake). > Reported by Joachim Schmitz in http://debbugs.gnu.org/9064. pushed. cheers, Pádraig. From unknown Sat Jun 21 10:40:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 11 Aug 2011 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator