mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Nathan McSween <nwmcsween@gmail.com>
To: musl@lists.openwall.com
Subject: Re: endian.h warnings
Date: Tue, 09 Jul 2013 19:29:12 -0700	[thread overview]
Message-ID: <51DCC6F8.50804@gmail.com> (raw)
In-Reply-To: <CAPfzE3ZSbwgBi=YLaqJ0qvYYN8Hp9qFiQSx=QGA8MYZqJyYnQA@mail.gmail.com>

On Tuesday, July 09, 2013 7:21:58 PM, Andre Renaud wrote:
> Hi,
> When using musl with -Wparentheses enabled, I get the following warnings:
> ../include/endian.h: In function '__bswap32':
> ../include/endian.h:32:2: warning: suggest parentheses around
> arithmetic in operand of '|' [-Wparentheses]
> ../include/endian.h:32:2: warning: suggest parentheses around
> arithmetic in operand of '|' [-Wparentheses]
> ../include/endian.h: In function '__bswap64':
> ../include/endian.h:37:2: warning: suggest parentheses around '+'
> inside '<<' [-Wparentheses]
>
> I appreciate that these aren't bugs, and are just gcc being over
> enthusiastic in it's warnings (which I've asked it to be on the
> command line), however would it be worth sticking some parentheses
> into the code simply to avoid this kind of noise being visible for
> users?
>
> Regards,
> Andres
Try with -Wall -Wextra -Wpedantic. GCC will spam warnings for nearly 
anything, struct padding warnings are extremely annoying. Somewhat 
(maybe?) concerning warnings are signed / unsigned comparisons in math/*



  parent reply	other threads:[~2013-07-10  2:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  2:21 Andre Renaud
2013-07-10  2:25 ` Rich Felker
2013-07-10  3:11   ` Andre Renaud
2013-07-10  2:29 ` Nathan McSween [this message]
2013-07-10  8:15   ` Szabolcs Nagy

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=51DCC6F8.50804@gmail.com \
    --to=nwmcsween@gmail.com \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).