* [PATCH] misc: quiet llvm build warnings
@ 2017-08-26 5:14 Andreas Dilger
2017-08-30 5:57 ` Theodore Ts'o
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Dilger @ 2017-08-26 5:14 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4, Andreas Dilger
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: misc: quiet llvm build warnings
2017-08-26 5:14 [PATCH] misc: quiet llvm build warnings Andreas Dilger
@ 2017-08-30 5:57 ` Theodore Ts'o
0 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2017-08-30 5:57 UTC (permalink / raw)
To: Andreas Dilger; +Cc: linux-ext4
On Fri, Aug 25, 2017 at 11:14:41PM -0600, Andreas Dilger wrote:
> 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>
The mkquota.c is already fixed on the maint branch, but I've applied
the tune2fs fix to the master/next branch.
Thanks,
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] misc: quiet llvm build warnings
@ 2017-10-10 22:41 Andreas Dilger
2017-10-10 22:44 ` Andreas Dilger
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Dilger @ 2017-10-10 22:41 UTC (permalink / raw)
To: tytso; +Cc: linux-ext4, Andreas Dilger
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] misc: quiet llvm build warnings
2017-10-10 22:41 [PATCH] " Andreas Dilger
@ 2017-10-10 22:44 ` Andreas Dilger
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Dilger @ 2017-10-10 22:44 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: linux-ext4
[-- Attachment #1: Type: text/plain, Size: 2143 bytes --]
On Oct 10, 2017, at 4:41 PM, Andreas Dilger <adilger@dilger.ca> wrote:
>
> 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
Sorry, please ignore this one, it was sent from an old branch and has
already been merged.
Cheers, Andreas
> 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
>
Cheers, Andreas
[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-10 22:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-26 5:14 [PATCH] misc: quiet llvm build warnings Andreas Dilger
2017-08-30 5:57 ` Theodore Ts'o
-- strict thread matches above, loose matches on Subject: below --
2017-10-10 22:41 [PATCH] " Andreas Dilger
2017-10-10 22:44 ` Andreas Dilger
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).