linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: linux-ext4@vger.kernel.org
Subject: Re: misc: replace comparison macros with inline functions
Date: Sun, 6 Mar 2016 21:24:14 -0500	[thread overview]
Message-ID: <20160307022414.GA6259@thunk.org> (raw)
In-Reply-To: <1457224216-71316-1-git-send-email-adilger@dilger.ca>

On Sat, Mar 05, 2016 at 05:30:16PM -0700, Andreas Dilger wrote:
> Replace the EXT2FS_RB_EMPTY_ROOT(), EXT2FS_RB_EMPTY_NODE(),
> EXT2FS_RB_CLEAR_NODE(), IS_BLOCK_BM(), IS_INODE_BM(), and
> IS_INODE_TB() macros with static inline functions to avoid
> suprious compiler warnings with clang:
> 
> 	pass1.c:618:28: warning: equality comparison with extraneous
> 		parentheses [-Wparentheses-equality]
> 	if ((*((__u32 *)(entry)) == 0UL)) {
>              ~~~~~~~~~~~~~~~~~~~~^~~~~~
> 	pass1.c:618:28: note: remove extraneous parentheses
> 		around the comparison to silence this warning
> 	if ((*((__u32 *)(entry)) == 0UL)) {
> 				 ^~
> 	pass1.c:618:28: note: use '=' to turn this equality
> 		comparison into an assignment
> 	if ((*((__u32 *)(entry)) == 0UL)) {
> 				 ^~
> 				 =
> 
> The static inline functions should compile identically, and allow
> some extra compile-time checking for the arguments over macros.
> 
> Signed-off-by: Andreas Dilger <adilger@dilger.ca>

Thanks, applied.

						- Ted

      parent reply	other threads:[~2016-03-07  2:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06  0:30 [PATCH] misc: replace comparison macros with inline functions Andreas Dilger
2016-03-06  2:05 ` Andreas Dilger
2016-03-07  2:24 ` Theodore Ts'o [this message]

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=20160307022414.GA6259@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.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 NNTP newsgroup(s).