gcc-4.7.0 on x86-64 spills out this warning:
src/sockaddr.c: In function "sockaddr_ntop": src/sockaddr.c:131:4: warning: format "%u" expects argument of type "unsigned int", but argument 3 has type "size_t" [-Wformat]
Change the "%u" format to "%zu" (available since glibc-2.1) to prevent this warning.
Signed-off-by: Vitezslav Samel vitezslav@samel.cz --- src/sockaddr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/sockaddr.c b/src/sockaddr.c index 6ffc989..f5de68c 100644 --- a/src/sockaddr.c +++ b/src/sockaddr.c @@ -128,7 +128,7 @@ void sockaddr_ntop(struct sockaddr_storage *addr, char *buf, size_t buflen) if (ret == NULL) { switch (errno) { case ENOSPC: - die("%s(): buffer too small (must be at least %u bytes)", __FUNCTION__, minlen); + die("%s(): buffer too small (must be at least %zu bytes)", __FUNCTION__, minlen); case EAFNOSUPPORT: die("%s(): Unknown address family", __FUNCTION__); }