From owner-svn-src-stable@FreeBSD.ORG Wed Sep 23 00:31:09 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11BEB1065679; Wed, 23 Sep 2009 00:31:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3E4A8FC08; Wed, 23 Sep 2009 00:31:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8N0V8Qn036915; Wed, 23 Sep 2009 00:31:08 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8N0V8bF036913; Wed, 23 Sep 2009 00:31:08 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200909230031.n8N0V8bF036913@svn.freebsd.org> From: Ed Maste Date: Wed, 23 Sep 2009 00:31:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197423 - stable/7/usr.bin/gcore X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2009 00:31:09 -0000 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);