On Wed, Nov 11, 2015 at 09:36:23AM +0100, Tobias Klauser wrote:
> 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?
Hi Tobias,

I only now get to my environment:

kernel: Linux 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 
GNU/Linux
gcc   : 5.2.0
dist  : Arch Linux

> 
> > 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.

At present I did not get this issue after pulling your last changes.

Regards,

-- 
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.

Reply via email to