Code

netlink: ensure size_t portability in DEBUG() statement
authorMarc Fournier <marc.fournier@camptocamp.com>
Wed, 3 Dec 2014 15:15:28 +0000 (16:15 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Wed, 3 Dec 2014 21:39:18 +0000 (22:39 +0100)
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]

src/netlink.c

index 422dc8c6fdadaf1b2feb7449cc5f3a82eda1954c..3c4642c296f82ea32c32a80e81db426225188d32 100644 (file)
@@ -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);