From: Marc Fournier Date: Wed, 3 Dec 2014 15:15:28 +0000 (+0100) Subject: netlink: ensure size_t portability in DEBUG() statement X-Git-Tag: collectd-5.4.2~5 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f6c89c17955223bf8c99a901ca6f901b83fa521f;p=collectd.git netlink: ensure size_t portability in DEBUG() statement This prevents the following error when building on 32bit systems with gcc 4.7.2: netlink.c: In function 'ir_read': netlink.c:783:7: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' [-Werror=format] --- diff --git a/src/netlink.c b/src/netlink.c index 422dc8c6..3c4642c2 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -683,7 +683,7 @@ static int ir_read (void) continue; } - DEBUG ("netlink plugin: ir_read: querying %s from %s (%lu).", + DEBUG ("netlink plugin: ir_read: querying %s from %s (%zu).", type_name[type_index], iflist[ifindex], ifindex); nlh = mnl_nlmsg_put_header (buf);