Use '%zd' format specifier for ssize_t
Found by: clang
This commit is contained in:
parent
2125cd9a35
commit
a2abcf1a7a
@ -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 fd)
|
||||
return;
|
||||
}
|
||||
if (len != sizeof(ch)) {
|
||||
warnx("signaller send ret %d", len);
|
||||
warnx("signaller send ret %zd", len);
|
||||
return;
|
||||
}
|
||||
if (close(fd) < 0) {
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user