diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index 9da22d7cd8fd..8228c57c6b61 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -183,7 +183,7 @@ elf_coredump(int efd __unused, int fd, pid_t pid) ptrace(PT_IO, pid, (caddr_t)&iorequest, 0); ngot = iorequest.piod_len; if ((size_t)ngot < nwant) - errx(1, "short read wanted %d, got %d", + errx(1, "short read wanted %zu, got %zd", nwant, ngot); ngot = write(fd, buf, nwant); if (ngot == -1)