embeddedsw icon indicating copy to clipboard operation
embeddedsw copied to clipboard

Compiler warning lwip / xadapter.c

Open blofeld80 opened this issue 2 years ago • 0 comments

Hi,

there is another warning when compiling xadapter.c

embeddedsw/ThirdParty/sw_services/lwip211/src/contrib/ports/xilinx/netif/xadapter.c:174:57: warning: passing argument 2 of 'netif_add' from incompatible pointer type [-Wincompatible-pointer-types]
      |                                 return netif_add(netif, ipaddr, netmask, gw,
      |                                                         ^~~~~~
      |                                                         |
      |                                                         ip_addr_t * {aka struct ip_addr *}

The fragement

return netif_add(netif, ipaddr, netmask, gw,

should become

return netif_add( netif,
		(const ip4_addr_t *) ipaddr,
		(const ip4_addr_t *) netmask,
		(const ip4_addr_t *) gw,

blofeld80 avatar Jan 05 '24 19:01 blofeld80