diff options
author | delphij <delphij@FreeBSD.org> | 2008-07-18 23:37:05 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2008-07-18 23:37:05 +0000 |
commit | de5d1b9a37a315c0a2e979012ae089225c9701f5 (patch) | |
tree | 0b49734e42bba58e0b8a605bbddbc50dec31d334 /usr.bin/gcore | |
parent | ec5327b1cde149539d03d17ed69996b71ac4a866 (diff) | |
download | FreeBSD-src-de5d1b9a37a315c0a2e979012ae089225c9701f5.zip FreeBSD-src-de5d1b9a37a315c0a2e979012ae089225c9701f5.tar.gz |
Use %zd for size_t. With this gcore(1) is WARNS=6 clean.
Diffstat (limited to 'usr.bin/gcore')
-rw-r--r-- | usr.bin/gcore/elfcore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index 2c27a64..a5acaf1 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, pid_t pid) err(1, "read from %s", memname); if ((size_t)ngot < nwant) errx(1, "short read from %s:" - " wanted %d, got %d", memname, + " wanted %zd, got %zd", memname, nwant, ngot); ngot = write(fd, buf, nwant); if (ngot == -1) @@ -414,7 +414,7 @@ readhdrinfo(pid_t pid, prstatus_t *status, prfpregset_t *fpregset, if ((n = read(fd, &status->pr_reg, sizeof status->pr_reg)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(status->pr_reg)) - errx(1, "short read from %s: wanted %u, got %d", name, + errx(1, "short read from %s: wanted %zd, got %d", name, sizeof status->pr_reg, n); close(fd); @@ -425,7 +425,7 @@ readhdrinfo(pid_t pid, prstatus_t *status, prfpregset_t *fpregset, if ((n = read(fd, fpregset, sizeof *fpregset)) == -1) err(1, "read error from %s", name); if ((size_t)n < sizeof(*fpregset)) - errx(1, "short read from %s: wanted %u, got %d", name, + errx(1, "short read from %s: wanted %zd, got %d", name, sizeof *fpregset, n); close(fd); |