lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Noise from sockets.c


From: Gisle Vanem
Subject: [lwip-devel] Noise from sockets.c
Date: Sun, 07 Aug 2011 02:03:09 +0200

A lot of noise coming from my MingW-gcc 4.5.0 when compiling sockets.c:

sockets.c: In function 'lwip_accept':
sockets.c:462:5: warning: format '%u' expects type 'unsigned int', but argument 
2 has type
'long unsigned int'

One way to make it shut up was this change in ip6_addr.h:

#define ip6_addr_debug_print(debug, ipaddr) \
 LWIP_DEBUGF(debug, 
("%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F":%"X16_F, \
                     ipaddr != NULL ? (u16_t)IP6_ADDR_BLOCK1(ipaddr) : 0,    \
                     ipaddr != NULL ? (u16_t)IP6_ADDR_BLOCK2(ipaddr) : 0,    \
                     ipaddr != NULL ? (u16_t)IP6_ADDR_BLOCK3(ipaddr) : 0,    \
                     ipaddr != NULL ? (u16_t)IP6_ADDR_BLOCK4(ipaddr) : 0,    \
                     ipaddr != NULL ? (u16_t)IP6_ADDR_BLOCK5(ipaddr) : 0,    \
                     ipaddr != NULL ? (u16_t)IP6_ADDR_BLOCK6(ipaddr) : 0,    \
                     ipaddr != NULL ? (u16_t)IP6_ADDR_BLOCK7(ipaddr) : 0,    \
                     ipaddr != NULL ? (u16_t)IP6_ADDR_BLOCK8(ipaddr) : 0))

Crude, I know. But since there is no 'x16_t' type, this cast made 'gcc -Wall' 
silent.
A better fix?

--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]