On 2015-11-10 at 21:19:42 +0100, Vadim Kochan <[email protected]> wrote:
> This reverts commit 664dcf4217c4fc08cc43c050419fea8181d81ef1.
Then we see:
proto_nlmsg.c: In function 'rtnl_print_ifinfo':
proto_nlmsg.c:45:10: warning: format '%lu' expects argument of type
'long unsigned int', but argument 2 has type 'unsigned int' [-Wformat=]
tprintf(", Len %lu\n", RTA_LEN(attr));
on i386.
> This commit causes format warnings while compilation:
>
> proto_nlmsg.c:45:10: warning: format ‘%d’ expects argument of type
> ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=]
> tprintf(", Len %d\n", RTA_LEN(attr));
> ^
Can't reproduce this here (amd64, GCC 4.8, kernel headers 3.19)
What GCC version do you see this with? What version of kernel headers?
What architecture?
> Seems like RTA_LEN has 'long' type while calculation of:
>
> RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0))
>
> I checked it by print sizeof of RTA_LEN and it was 8.
Can't see how this could possibly become an unsigned long, but ok. I'd
say the best way to solve this is by casting RTA_LEN to an int
explicitely and then use %d.
--
You received this message because you are subscribed to the Google Groups
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.