Skip to content

Commit 525b594

Browse files
agnersmisery
authored andcommitted
Explicitly type cast to uint32_t to avoid ambiguity
.piolibdeps/esp32-test/ESPAsyncWebServer-esphome/src/AsyncWebSocket.cpp: In member function 'IPAddress AsyncWebSocketClient::remoteIP()': .piolibdeps/esp32-test/ESPAsyncWebServer-esphome/src/AsyncWebSocket.cpp:832:29: error: call of overloaded 'IPAddress(long unsigned int)' is ambiguous return IPAddress(0UL); ^ In file included from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:163, from .piolibdeps/esp32-test/ESPAsyncWebServer-esphome/src/AsyncWebSocket.cpp:21: /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/IPAddress.h:51:5: note: candidate: 'IPAddress::IPAddress(const uint8_t*)' IPAddress(const uint8_t *address); ^~~~~~~~~ /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/IPAddress.h:50:5: note: candidate: 'IPAddress::IPAddress(uint32_t)' IPAddress(uint32_t address); ^~~~~~~~~
1 parent 22ed549 commit 525b594

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AsyncWebSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ void AsyncWebSocketClient::binary(AsyncWebSocketMessageBuffer * buffer)
831831

832832
IPAddress AsyncWebSocketClient::remoteIP() {
833833
if(!_client) {
834-
return IPAddress(0U);
834+
return IPAddress((uint32_t)0);
835835
}
836836
return _client->remoteIP();
837837
}

0 commit comments

Comments
 (0)