Component
------sntp
---------include
---------------sntp.h
---------------sntp_opts.h
---------component.mk (empty file)
---------sntp.c
I get the following results:
Code: Select all
CXX build/main/utils.o
CXX build/main/main.o
AR build/main/libmain.a
CC build/sntp/sntp.o
In file included from /home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/lwip/arch.h:43:0,
from /home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/lwip/debug.h:35,
from /home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/lwip/opt.h:46,
from /home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/apps/sntp/sntp_opts.h:35,
from /home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/apps/sntp/sntp.h:35,
from /prj_folder/ESP32/prj_name/components/sntp/./sntp.c:48:
/prj_folder/ESP32/prj_name/components/sntp/./sntp.c: In function 'sntp_request':
/home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:157:38: error: the comparison will always evaluate as 'false' for the address of 'sntp_server_address' will never be NULL [-Werror=address]
#define ipaddr_ntoa(addr) (((addr) == NULL) ? "NULL" : \
^
/home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/port/arch/cc.h:71:44: note: in definition of macro 'LWIP_PLATFORM_DIAG'
#define LWIP_PLATFORM_DIAG(x) do {printf x;} while(0)
^
/prj_folder/ESP32/prj_name/components/sntp/./sntp.c:516:5: note: in expansion of macro 'LWIP_DEBUGF'
LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp_request: current server address is %s\n",
^
/prj_folder/ESP32/prj_name/components/sntp/./sntp.c:517:7: note: in expansion of macro 'ipaddr_ntoa'
ipaddr_ntoa(&sntp_server_address)));
^
/home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:71:50: error: the comparison will always evaluate as 'true' for the address of 'sntp_server_address' will never be NULL [-Werror=address]
#define IP_IS_V6(ipaddr) (((ipaddr) != NULL) && IP_IS_V6_VAL(*(ipaddr)))
^
/home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/lwip/debug.h:105:34: note: in expansion of macro 'LWIP_PLATFORM_DIAG'
LWIP_PLATFORM_DIAG(message); \
^
/prj_folder/ESP32/prj_name/components/sntp/./sntp.c:516:5: note: in expansion of macro 'LWIP_DEBUGF'
LWIP_DEBUGF(SNTP_DEBUG_TRACE, ("sntp_request: current server address is %s\n",
^
/home/xxxx/ESP32/esp-idf/components/lwip/include/lwip/lwip/ip_addr.h:158:5: note: in expansion of macro 'IP_IS_V6'
((IP_IS_V6(addr)) ? ip6addr_ntoa(ip_2_ip6(addr)) : ip4addr_ntoa(ip_2_ip4(addr))))
^
/prj_folder/ESP32/prj_name/components/sntp/./sntp.c:517:7: note: in expansion of macro 'ipaddr_ntoa'
ipaddr_ntoa(&sntp_server_address)));
^
cc1: some warnings being treated as errors
/home/xxxx/ESP32/esp-idf/make/component_wrapper.mk:273: recipe for target 'sntp.o' failed
make[1]: *** [sntp.o] Error 1
/home/xxxx/ESP32/esp-idf/make/project.mk:450: recipe for target 'component-sntp-build' failed
make: *** [component-sntp-build] Error 2
I just copy pasted the orginal component and have not modified it yet, so it should compile, anybody have any idea why this is happening?