diff mbox series

[09/17] xfs_repair: explicitly cast directory inode numbers in do_warn

Message ID 164263814439.863810.11076153423409347035.stgit@magnolia (mailing list archive)
State New, archived
Headers show
Series xfsprogs: various 5.15 fixes | expand

Commit Message

Darrick J. Wong Jan. 20, 2022, 12:22 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Explicitly cast the ondisk directory inode argument to do_warn when
complaining about corrupt directories.  This avoids build warnings on
armv7l.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 repair/dir2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Sandeen Feb. 25, 2022, 9:48 p.m. UTC | #1
On 1/19/22 6:22 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Explicitly cast the ondisk directory inode argument to do_warn when
> complaining about corrupt directories.  This avoids build warnings on
> armv7l.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>

The fix is fine but there's no casting going on, you're using
PRIu64... *shrug* did you intend to cast it? Probably not since
every other instance uses PRIu64.

I'll fix up the commit log if I remember.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  repair/dir2.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/repair/dir2.c b/repair/dir2.c
> index fdf91532..946e729e 100644
> --- a/repair/dir2.c
> +++ b/repair/dir2.c
> @@ -1358,7 +1358,7 @@ _("can't read block %" PRIu64 " for directory inode %" PRIu64 "\n"),
>  		}
>  		if (bp->b_error == -EFSCORRUPTED) {
>  			do_warn(
> -_("corrupt directory data block %lu for inode %" PRIu64 "\n"),
> +_("corrupt directory data block %" PRIu64 " for inode %" PRIu64 "\n"),
>  				dbno, ino);
>  			libxfs_buf_relse(bp);
>  			continue;
>
diff mbox series

Patch

diff --git a/repair/dir2.c b/repair/dir2.c
index fdf91532..946e729e 100644
--- a/repair/dir2.c
+++ b/repair/dir2.c
@@ -1358,7 +1358,7 @@  _("can't read block %" PRIu64 " for directory inode %" PRIu64 "\n"),
 		}
 		if (bp->b_error == -EFSCORRUPTED) {
 			do_warn(
-_("corrupt directory data block %lu for inode %" PRIu64 "\n"),
+_("corrupt directory data block %" PRIu64 " for inode %" PRIu64 "\n"),
 				dbno, ino);
 			libxfs_buf_relse(bp);
 			continue;