From owner-svn-src-head@FreeBSD.ORG Mon Nov 19 22:53:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 42AF0610; Mon, 19 Nov 2012 22:53:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 275FD8FC15; Mon, 19 Nov 2012 22:53:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAJMrwB5057347; Mon, 19 Nov 2012 22:53:58 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAJMrvYt057344; Mon, 19 Nov 2012 22:53:57 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201211192253.qAJMrvYt057344@svn.freebsd.org> From: Ed Maste Date: Mon, 19 Nov 2012 22:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243313 - in head/tools/regression/sockets: sblock unix_seqpacket_exercise zerosend X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2012 22:53:58 -0000 Author: emaste Date: Mon Nov 19 22:53:57 2012 New Revision: 243313 URL: http://svnweb.freebsd.org/changeset/base/243313 Log: Use '%zd' format specifier for ssize_t Found by: clang Modified: head/tools/regression/sockets/sblock/sblock.c head/tools/regression/sockets/unix_seqpacket_exercise/unix_seqpacket_exercise.c head/tools/regression/sockets/zerosend/zerosend.c Modified: head/tools/regression/sockets/sblock/sblock.c ============================================================================== --- head/tools/regression/sockets/sblock/sblock.c Mon Nov 19 22:46:17 2012 (r243312) +++ head/tools/regression/sockets/sblock/sblock.c Mon Nov 19 22:53:57 2012 (r243313) @@ -76,7 +76,7 @@ blocking_recver(int fd) if (len == 0) errx(-1, "FAIL: blocking_recver: recv: eof"); if (len != 1) - errx(-1, "FAIL: blocking_recver: recv: %d bytes", len); + errx(-1, "FAIL: blocking_recver: recv: %zd bytes", len); if (interrupted) errx(-1, "FAIL: blocking_recver: interrupted wrong pid"); } @@ -134,7 +134,7 @@ signaller(pid_t locking_recver_pid, int return; } if (len != sizeof(ch)) { - warnx("signaller send ret %d", len); + warnx("signaller send ret %zd", len); return; } if (close(fd) < 0) { Modified: head/tools/regression/sockets/unix_seqpacket_exercise/unix_seqpacket_exercise.c ============================================================================== --- head/tools/regression/sockets/unix_seqpacket_exercise/unix_seqpacket_exercise.c Mon Nov 19 22:46:17 2012 (r243312) +++ head/tools/regression/sockets/unix_seqpacket_exercise/unix_seqpacket_exercise.c Mon Nov 19 22:53:57 2012 (r243313) @@ -50,21 +50,21 @@ __FBSDID("$FreeBSD$"); #define SEQPACKET_SNDBUF (131072-16) #define FAILERR(str) err(-1, "%s: %s", __func__, str) -#define FAILNERR(str, n) err(-1, "%s %d: %s", __func__, n, str) -#define FAILNMERR(str, n, m) err(-1, "%s %d %d: %s", __func__, n, m, str) +#define FAILNERR(str, n) err(-1, "%s %zd: %s", __func__, n, str) +#define FAILNMERR(str, n, m) err(-1, "%s %zd %d: %s", __func__, n, m, str) #define FAILERRX(str) errx(-1, "%s: %s", __func__, str) -#define FAILNERRX(str, n) errx(-1, "%s %d: %s", __func__, n, str) -#define FAILNMERRX(str, n, m) errx(-1, "%s %d %d: %s", __func__, n, m, str) +#define FAILNERRX(str, n) errx(-1, "%s %zd: %s", __func__, n, str) +#define FAILNMERRX(str, n, m) errx(-1, "%s %zd %d: %s", __func__, n, m, str) static int ann = 0; #define ANN() (ann ? warnx("%s: start", __func__) : 0) -#define ANNN(n) (ann ? warnx("%s %d: start", __func__, (n)) : 0) -#define ANNNM(n, m) (ann ? warnx("%s %d %d: start", __func__, (n), (m)) : 0) +#define ANNN(n) (ann ? warnx("%s %zd: start", __func__, (n)) : 0) +#define ANNNM(n, m) (ann ? warnx("%s %zd %d: start", __func__, (n), (m)):0) #define OK() warnx("%s: ok", __func__) -#define OKN(n) warnx("%s %d: ok", __func__, (n)) -#define OKNM(n, m) warnx("%s %d %d: ok", __func__, (n), (m)) +#define OKN(n) warnx("%s %zd: ok", __func__, (n)) +#define OKNM(n, m) warnx("%s %zd %d: ok", __func__, (n), (m)) #ifdef SO_NOSIGPIPE #define NEW_SOCKET(s) do { \ @@ -168,7 +168,7 @@ server(int s_listen) break; } if (ssize_send != ssize_recv) - warnx("server: recv %d sent %d", + warnx("server: recv %zd sent %zd", ssize_recv, ssize_send); } while (1); close(s_accept); Modified: head/tools/regression/sockets/zerosend/zerosend.c ============================================================================== --- head/tools/regression/sockets/zerosend/zerosend.c Mon Nov 19 22:46:17 2012 (r243312) +++ head/tools/regression/sockets/zerosend/zerosend.c Mon Nov 19 22:53:57 2012 (r243313) @@ -56,7 +56,7 @@ try_0send(const char *test, int fd) if (len < 0) err(-1, "%s: try_0send", test); if (len != 0) - errx(-1, "%s: try_0send: returned %d", test, len); + errx(-1, "%s: try_0send: returned %zd", test, len); } static void @@ -70,7 +70,7 @@ try_0write(const char *test, int fd) if (len < 0) err(-1, "%s: try_0write", test); if (len != 0) - errx(-1, "%s: try_0write: returned %d", test, len); + errx(-1, "%s: try_0write: returned %zd", test, len); } static void