From 14c929401cf3bd037ef8dc4dfab47f30b417acd5 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 26 Jan 2012 23:14:28 +0100 Subject: [PATCH] Use %zu for printf() when argument is of kind size_t. %zu is valid in C99 and is supported by GNU LibC. We'll see if there exists a portability issue. In this case, %lu and a cast to unsigned long should be used instead. --- src/ctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ctl.c b/src/ctl.c index 6c644cbd..050b7c01 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -133,8 +133,8 @@ ctl_msg_recv(int fd, enum hmsg_type *type, void **t) goto recv_error; } if (n != hdr.len) { - LLOG_WARNX("received message is too short (%d < %ld)", - n, hdr.len); + LLOG_WARNX("received message is too short (%d < %zu)", + n, hdr.len); goto recv_error; } fcntl(fd, F_SETFL, flags); /* No error check */ -- 2.39.5