fix(components): Fix all components's compile warning and enable warning checking

This commit is contained in:
Dong Heng
2018-08-07 13:00:43 +08:00
parent 7c46284f50
commit 35ee995327
19 changed files with 81 additions and 55 deletions

View File

@ -27,6 +27,7 @@
#include "lwip/pbuf.h"
#include "lwip/udp.h"
#include "lwip/mem.h"
#include "lwip/timeouts.h"
#include "dhcpserver/dhcpserver.h"
#include "dhcpserver/dhcpserver_options.h"
@ -1154,7 +1155,7 @@ void dhcps_start(struct netif *netif, ip4_addr_t ip)
udp_bind(pcb_dhcps, &netif->ip_addr, DHCPS_SERVER_PORT);
udp_recv(pcb_dhcps, handle_dhcp, NULL);
sys_timeout(1000, dhcps_coarse_tmr, NULL);
sys_timeout(1000, (sys_timeout_handler)dhcps_coarse_tmr, NULL);
#if DHCPS_DEBUG
DHCPS_LOG("dhcps:dhcps_start->udp_recv function Set a receive callback handle_dhcp for UDP_PCB pcb_dhcps\n");
#endif
@ -1176,7 +1177,7 @@ void dhcps_stop(struct netif *netif)
return;
}
sys_untimeout(dhcps_coarse_tmr, NULL);
sys_untimeout((sys_timeout_handler)dhcps_coarse_tmr, NULL);
if (pcb_dhcps != NULL) {
udp_disconnect(pcb_dhcps);
@ -1273,7 +1274,7 @@ void dhcps_coarse_tmr(void)
/*Do not restart timer when dhcp server is stopped*/
if (pcb_dhcps != NULL) {
sys_timeout(1000, dhcps_coarse_tmr, NULL);
sys_timeout(1000, (sys_timeout_handler)dhcps_coarse_tmr, NULL);
}
}

View File

@ -20,6 +20,7 @@ COMPONENT_SRCDIRS += apps/dhcpserver \
CFLAGS += -Wno-address #lots of LWIP source files evaluate macros that check address of stack variables
lwip/src/apps/sntp/sntp.o: CFLAGS += -Wno-implicit-function-declaration
lwip/src/core/ipv4/ip4.o: CFLAGS += -Wno-implicit-function-declaration
ifdef CONFIG_LWIP_SOCKET_MULTITHREAD
COMPONENT_OBJEXCLUDE := lwip/src/api/sockets.o

View File

@ -1900,7 +1900,7 @@ void *memp_malloc_ll(size_t type);
---------------------------------------
*/
#define LWIP_HOOK_IP4_ROUTE_SRC ip4_route_src_hook
#define LWIP_HOOK_IP4_ROUTE_SRC(d, s) (void *)ip4_route_src_hook(d, s)
/**
* @defgroup lwip_opts_hooks Hooks