From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-042.btinternet.com (mailomta10-re.btinternet.com [213.120.69.103]) by sourceware.org (Postfix) with ESMTPS id 95988385700A for ; Sat, 19 Jun 2021 16:54:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 95988385700A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from re-prd-rgout-002.btmx-prd.synchronoss.net ([10.2.54.5]) by re-prd-fep-042.btinternet.com with ESMTP id <20210619165451.EMEQ11727.re-prd-fep-042.btinternet.com@re-prd-rgout-002.btmx-prd.synchronoss.net> for ; Sat, 19 Jun 2021 17:54:51 +0100 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com X-SNCR-Rigid: 5ED9C0CC38345CF8 X-Originating-IP: [86.139.156.26] X-OWM-Source-IP: 86.139.156.26 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduledrfeefhedguddthecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeelieegheeghfevfeevhfdviedugfdvuefhjeehteejffefhfeuudetheeugfffhfenucfkphepkeeirddufeelrdduheeirddvieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddrudduudgnpdhinhgvthepkeeirddufeelrdduheeirddviedpmhgrihhlfhhrohhmpeeojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhequceuqfffjgepkeeukffvoffkoffgpdhrtghpthhtohepoehnvgiflhhisgesshhouhhrtggvfigrrhgvrdhorhhgqe X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.111] (86.139.156.26) by re-prd-rgout-002.btmx-prd.synchronoss.net (5.8.340) (authenticated as jonturney@btinternet.com) id 5ED9C0CC38345CF8 for newlib@sourceware.org; Sat, 19 Jun 2021 17:54:51 +0100 Subject: Re: makedoc.c: Warning when -Wall To: "newlib@sourceware.org" References: From: Jon Turney Message-ID: Date: Sat, 19 Jun 2021 17:54:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3569.8 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2021 16:54:54 -0000 On 17/06/2021 22:52, Joel Sherrill wrote: > Hi > > I noticed in tbe build output that makedoc.c is compiled without -Wall. I'm > not sure how to add that to the Makefile but when I built it by hand, it > turned up this single warning. I am not sure where the parentheses should > go to address the warning and ensure this is doing what's intended. It > doesn't help that I don't know what the intent is. :). > > ../newlib-cygwin/newlib/doc/makedoc.c: In function ‘courierize’: > ../newlib-cygwin/newlib/doc/makedoc.c:574:6: warning: suggest parentheses > around ‘&&’ within ‘||’ [-Wparentheses] > && (at(tos, idx+1) == '.') > ^ > Thanks. I think the intent is: && (at(tos, idx +1 ) == '.' || at(tos,idx+1) == '|')) ... which is done with correct parenthesization about 30 lines above :)