gmag11/NtpClient

Error in develop branch

Bolukan opened this issue · 4 comments

FYI: Line 224 of develop branche creates an error if compiling in platformio:

.piolibdeps\NtpClientLib\src\NTPClientLib.cpp: In member function 'void NTPClient::dnsFound(const ip4_addr*)':
.piolibdeps\NtpClientLib\src\NTPClientLib.cpp:224:46: error: ambiguous overload for 'operator!=' (operand types are 'IPAddress' and 'int')
if (ipaddr != NULL && ntpServerIPAddress != 0)
^
.piolibdeps\NtpClientLib\src\NTPClientLib.cpp:224:46: note: candidates are:

.piolibdeps\NtpClientLib\src\NTPClientLib.cpp:224:46: note: operator!=(uint32_t {aka unsigned int}, int) <built-in>
.piolibdeps\NtpClientLib\src\NTPClientLib.cpp:224:46: note: operator!=(u32_t {aka long unsigned int}, int) <built-in>
.piolibdeps\NtpClientLib\src\NTPClientLib.cpp:224:46: note: operator!=(int, int) <built-in>
.piolibdeps\NtpClientLib\src\NTPClientLib.cpp:224:46: note: operator!=(const ip_addr_t* {aka const ip4_addr*}, const ip_addr_t* {aka const ip4_addr*}) <built-in>
.piolibdeps\NtpClientLib\src\NTPClientLib.cpp:224:46: note: operator!=(ip_addr_t* {aka ip4_addr*}, ip_addr_t* {aka ip4_addr*}) <built-in>
In file included from ...\.platformio\packages\framework-arduinoespressif8266\libraries\ESP8266WiFi\src/ESP8266WiFi.h:31:0,
from .piolibdeps\NtpClientLib\src\NtpClientLib.h:104,
from .piolibdeps\NtpClientLib\src\NTPClientLib.cpp:32:
...\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:106:14: note: bool IPAddress::operator!=(const IPAddress&) const
bool operator!=(const IPAddress& addr) const {
^
...\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:115:14: note: bool IPAddress::operator!=(uint32_t) const

bool operator!=(uint32_t addr) const {
^
...\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/IPAddress.h:118:14: note: bool IPAddress::operator!=(u32_t) const
bool operator!=(u32_t addr) const {
^
*** [.pioenvs\d1_mini\libf30\NtpClientLib\NTPClientLib.cpp.o] Error 1

I am seeing the same error compiling on the Arduino IDE for an ESP8266. Have you tried compiling with a different LwIP version?

I have not tried it yet but that could change things.

I've tested compilation on Arduino IDE and VisualMicro, I do not use Platformio yet sorry.

With latest ESP8266 Arduino core 2.5.0 it compiles without any problem.

What ESP8266 Core and NTPClient library versions are you using? I've just released 3.0.0-beta. Maybe you can try it.

Running 3.0.1-beta without performance or compile issues.

I am chasing a pernicious memory leak in an ESP32 compile. I have not found the culprit. Its probably not this library.

I close this issue. Feel free to reopen it if needed