From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Behun Date: Sat, 27 Jan 2018 23:17:38 +0100 Subject: [U-Boot] [PATCH 3/4] fs: btrfs: Fix printf format character warning In-Reply-To: <1517082491-13491-3-git-send-email-trini@konsulko.com> References: <1517082491-13491-1-git-send-email-trini@konsulko.com> <1517082491-13491-3-git-send-email-trini@konsulko.com> Message-ID: <20180127231738.2dc8d103@nic.cz> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de shouldn't in that case the (u32) cast be removed? On Sat, 27 Jan 2018 14:48:10 -0500 Tom Rini wrote: > When printing a size_t value we need to use %zu for portability > between 32bit and 64bit targets. >=20 > Cc: Marek Beh=C3=BAn > Signed-off-by: Tom Rini > --- > fs/btrfs/super.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > index 2529c2b3b6a6..b0a5cffce31e 100644 > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -147,7 +147,7 @@ static int btrfs_check_super(struct > btrfs_super_block *sb)=20 > if (sb->sys_chunk_array_size < sizeof(struct btrfs_key) + > sizeof(struct btrfs_chunk)) { > - printf("%s: system chunk array too small %u < > %lu\n", __func__, > + printf("%s: system chunk array too small %u < > %zu\n", __func__, sb->sys_chunk_array_size, (u32) sizeof(struct > btrfs_key) > + sizeof(struct btrfs_chunk)); > ret =3D -1;