git: 208f11e8063a - main - linprocfs: use %z for size_t arguments

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 22 May 2024 02:20:30 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=208f11e8063af7b52bddd4e7a179906e7e8c7ddf

commit 208f11e8063af7b52bddd4e7a179906e7e8c7ddf
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-05-22 02:01:58 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-22 02:03:08 +0000

    linprocfs: use %z for size_t arguments
    
    64-bit doesn't care or give a warning, but i386 compile complains
    (rightly) that these are size_t and need a %z modifier.
    
    Fixes: 25a04527b706
    Sponsored by:           Netflix
---
 sys/compat/linprocfs/linprocfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index bfa2074a78d3..617eb122291c 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -2115,7 +2115,7 @@ linprocfs_dosysvipc_msg(PFS_FILL_ARGS)
 		if (msqids[id].u.msg_qbytes == 0)
 			continue;
 		sbuf_printf(sb,
-		    "%10d %10lu  %4o  %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n",
+		    "%10d %10zu  %4o  %10lu %10lu %5u %5u %5u %5u %5u %5u %jd %jd %jd\n",
 		    (int)msqids[id].u.msg_perm.key,
 		    IXSEQ_TO_IPCID(id, msqids[id].u.msg_perm),
 		    msqids[id].u.msg_perm.mode,
@@ -2158,7 +2158,7 @@ linprocfs_dosysvipc_sem(PFS_FILL_ARGS)
 		if ((semids[id].u.sem_perm.mode & SEM_ALLOC) == 0)
 			continue;
 		sbuf_printf(sb,
-		    "%10d %10lu  %4o %10u %5u %5u %5u %5u %jd %jd\n",
+		    "%10d %10zu  %4o %10u %5u %5u %5u %5u %jd %jd\n",
 		    (int)semids[id].u.sem_perm.key,
 		    IXSEQ_TO_IPCID(id, semids[id].u.sem_perm),
 		    semids[id].u.sem_perm.mode,
@@ -2198,7 +2198,7 @@ linprocfs_dosysvipc_shm(PFS_FILL_ARGS)
 		if ((shmids[id].u.shm_perm.mode & SHMSEG_ALLOCATED) == 0)
 			continue;
 		sbuf_printf(sb,
-		    "%10d %10lu  %4o %21zu %5u %5u  %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n",
+		    "%10d %10zu  %4o %21zu %5u %5u  %5u %5u %5u %5u %5u %jd %jd %jd %21d %21d\n",
 		    (int)shmids[id].u.shm_perm.key,
 		    IXSEQ_TO_IPCID(id, shmids[id].u.shm_perm),
 		    shmids[id].u.shm_perm.mode,