linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@dilger.ca>
Subject: [PATCH] misc: quiet llvm build warnings
Date: Tue, 10 Oct 2017 16:41:23 -0600	[thread overview]
Message-ID: <1507675283-70118-1-git-send-email-adilger@dilger.ca> (raw)

Quiet some relatively harmless build warnings:

mkquota.c:527:15: warning: format specifies type 'long' but the
	argument has type 'qsize_t' (aka 'long long') [-Wformat]
		dq->dq_id, dq->dq_dqb.dqb_curspace,
			   ^~~~~~~~~~~~~~~~~~~~~~~

tune2fs.c:928:18: warning: '&&' within '||' [-Wlogical-op-parentheses]
	if (pass == 1 && (inode->i_flags & EXT4_EA_INODE_FL) ||
	    ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
tune2fs.c:928:18: place parentheses around '&&' to silence warning

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
---
 lib/support/mkquota.c | 2 +-
 misc/tune2fs.c        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/support/mkquota.c b/lib/support/mkquota.c
index 11a878e..4251e46 100644
--- a/lib/support/mkquota.c
+++ b/lib/support/mkquota.c
@@ -523,7 +523,7 @@ static int scan_dquots_callback(struct dquot *dquot, void *cb_data)
 	    dq->dq_dqb.dqb_curinodes != dquot->dq_dqb.dqb_curinodes) {
 		scan_data->usage_is_inconsistent = 1;
 		fprintf(stderr, "[QUOTA WARNING] Usage inconsistent for ID %u:"
-			"actual (%ld, %ld) != expected (%ld, %ld)\n",
+			"actual (%lld, %lld) != expected (%lld, %lld)\n",
 			dq->dq_id, dq->dq_dqb.dqb_curspace,
 			dq->dq_dqb.dqb_curinodes,
 			dquot->dq_dqb.dqb_curspace,
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 9b53dc2..c7c1d6d 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -925,8 +925,8 @@ static void rewrite_inodes(ext2_filsys fs)
 			if (!ino)
 				break;
 
-			if (pass == 1 && (inode->i_flags & EXT4_EA_INODE_FL) ||
-			    pass == 2 && !(inode->i_flags & EXT4_EA_INODE_FL))
+			if ((pass == 1 && (inode->i_flags & EXT4_EA_INODE_FL))||
+			    (pass == 2 && !(inode->i_flags & EXT4_EA_INODE_FL)))
 				rewrite_one_inode(&ctx, ino, inode);
 		} while (ino);
 
-- 
1.8.0

             reply	other threads:[~2017-10-10 22:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 22:41 Andreas Dilger [this message]
2017-10-10 22:44 ` [PATCH] misc: quiet llvm build warnings Andreas Dilger
  -- strict thread matches above, loose matches on Subject: below --
2017-08-26  5:14 Andreas Dilger

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=1507675283-70118-1-git-send-email-adilger@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).