mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Andre Renaud <andre@bluewatersys.com>
To: musl@lists.openwall.com
Subject: endian.h warnings
Date: Wed, 10 Jul 2013 14:21:58 +1200	[thread overview]
Message-ID: <CAPfzE3ZSbwgBi=YLaqJ0qvYYN8Hp9qFiQSx=QGA8MYZqJyYnQA@mail.gmail.com> (raw)

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,
Andre


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  2:21 Andre Renaud [this message]
2013-07-10  2:25 ` Rich Felker
2013-07-10  3:11   ` Andre Renaud
2013-07-10  2:29 ` Nathan McSween
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='CAPfzE3ZSbwgBi=YLaqJ0qvYYN8Hp9qFiQSx=QGA8MYZqJyYnQA@mail.gmail.com' \
    --to=andre@bluewatersys.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).