Date: Wed, 23 Sep 2009 00:31:08 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r197423 - stable/7/usr.bin/gcore Message-ID: <200909230031.n8N0V8bF036913@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Sep 23 00:31:08 2009 New Revision: 197423 URL: http://svn.freebsd.org/changeset/base/197423 Log: MFC r180603: Use %zd for size_t. With this gcore(1) is WARNS=6 clean. Modified: stable/7/usr.bin/gcore/ (props changed) stable/7/usr.bin/gcore/elfcore.c Modified: stable/7/usr.bin/gcore/elfcore.c ============================================================================== --- stable/7/usr.bin/gcore/elfcore.c Tue Sep 22 23:11:23 2009 (r197422) +++ stable/7/usr.bin/gcore/elfcore.c Wed Sep 23 00:31:08 2009 (r197423) @@ -158,7 +158,7 @@ elf_coredump(int efd __unused, int fd, p 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 *statu 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 *statu 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909230031.n8N0V8bF036913>