Strange warning
Posted: Tue Sep 24, 2019 3:22 pm
Hello,
With this code:
Compilation raises a warning on line udp_connect : Warning : passing argument 2 of 'udp_connect' from incompatible pointer type [-Wincompatible-pointer-types]
Why?
Thanks
Julien
With this code:
Code: Select all
tcpip_adapter_ip_info_t ip_info;
tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info);
/* Create a new UDP control block */
struct udp_pcb *upcb = udp_new_ip_type(IPADDR_TYPE_V4);
if (upcb != NULL) {
ip4_addr_t serverIp = ip_info.gw;
udp_connect(upcb, &serverIp, UDP_SERVER_PORT); // Warning : passing argument 2 of 'udp_connect' from incompatible pointer type [-Wincompatible-pointer-types]
}
Why?
Thanks
Julien