Date: Fri, 3 Feb 2023 00:04:20 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: fb53e7adaf5b - main - tarfs: Fix 32-bit build. Message-ID: <7AB1A313-19CD-4A37-BB7D-22BD384BE327@FreeBSD.org> In-Reply-To: <202302022039.312KdedK078659@gitrepo.freebsd.org> References: <202302022039.312KdedK078659@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_CF5C187F-D435-4014-A331-6EAC4209D028 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 2 Feb 2023, at 21:39, Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org> = wrote: >=20 > The branch main has been updated by des: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dfb53e7adaf5b45ca08f650babc40077d= eff5e9af >=20 > commit fb53e7adaf5b45ca08f650babc40077deff5e9af > Author: Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org> > AuthorDate: 2023-02-02 20:36:01 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.org> > CommitDate: 2023-02-02 20:39:10 +0000 >=20 > tarfs: Fix 32-bit build. >=20 > Sponsored by: Juniper Networks, Inc. > Sponsored by: Klara, Inc. ... > --- a/sys/fs/tarfs/tarfs_subr.c > +++ b/sys/fs/tarfs/tarfs_subr.c > @@ -137,7 +137,7 @@ tarfs_print_node(struct tarfs_node *tnp) > printf("\tvnode %p\n", tnp->vnode); > printf("\ttmp %p\n", tnp->tmp); > printf("\ttype %d\n", tnp->type); > - printf("\tino %lu\n", tnp->ino); > + printf("\tino %lu\n", (unsigned long)tnp->ino); > printf("\tsize %zu\n", tnp->size); > printf("\tname %s\n", > (tnp->name =3D=3D NULL) ? "<<root>>" : tnp->name); > @@ -146,7 +146,7 @@ tarfs_print_node(struct tarfs_node *tnp) > printf("\tgid %d\n", tnp->gid); > printf("\tmode o%o\n", tnp->mode); > printf("\tflags %u\n", tnp->flags); > - printf("\tnlink %lu\n", tnp->nlink); > + printf("\tnlink %lu\n", (unsigned long)tnp->nlink); > printf("\tatime %d\n", (int)tnp->atime.tv_sec); > printf("\tmtime %d\n", (int)tnp->mtime.tv_sec); > printf("\tctime %d\n", (int)tnp->ctime.tv_sec); This be just nitpicking, but the ino and nlink fields are typically defined as int64_t and uint64_t, so these should be printed as such. Since PRId64 and PRIu64 are apparently frowned upon, the usual solution is to cast everything to intmax_t or uintmax_t, and use %j for the modifier. -Dimitry --Apple-Mail=_CF5C187F-D435-4014-A331-6EAC4209D028 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCY9xBdQAKCRCwXqMKLiCW o9p4AKDa0t6UXWjyDEUD30BNktOaHzJs/gCgwn7r2JeQ78DjRpDEWgqlhkeBzyw= =EzaJ -----END PGP SIGNATURE----- --Apple-Mail=_CF5C187F-D435-4014-A331-6EAC4209D028--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7AB1A313-19CD-4A37-BB7D-22BD384BE327>