Xilinx / embeddedsw

Xilinx Embedded Software (embeddedsw) Development
Other
885 stars 1.05k forks source link

Compiler warning lwip / xadapter.c #282

Open blofeld80 opened 5 months ago

blofeld80 commented 5 months ago

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,