From: Jon Turney <jon.turney@dronecode.org.uk>
To: "newlib@sourceware.org" <newlib@sourceware.org>
Subject: Re: makedoc.c: Warning when -Wall
Date: Sat, 19 Jun 2021 17:54:26 +0100 [thread overview]
Message-ID: <e82c3fa1-2f27-e856-e404-e894018a7ad7@dronecode.org.uk> (raw)
In-Reply-To: <CAF9ehCXK_pKj=HrDyckO79aoV6OzJKvwdHNSgKAGKDqYsHBfLQ@mail.gmail.com>
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 :)
next prev parent reply other threads:[~2021-06-19 16:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 21:52 Joel Sherrill
2021-06-19 16:54 ` Jon Turney [this message]
2021-06-17 23:23 C Howland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e82c3fa1-2f27-e856-e404-e894018a7ad7@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).