Skip to content

Commit ac87510

Browse files
committed
Ignore unused-variable warning for internal_posix_time variable
Otherwise in combination with -Werror=all used in newer ESP32 cores will trigger a compilation error.
1 parent 7e73a36 commit ac87510

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,10 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_ConnectPhy()
387387

388388
ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_SyncTime()
389389
{
390+
#pragma GCC diagnostic push
391+
#pragma GCC diagnostic ignored "-Wunused-variable"
390392
unsigned long const internal_posix_time = _time_service.getTime();
393+
#pragma GCC diagnostic pop
391394
DEBUG_VERBOSE("ArduinoIoTCloudTCP::%s internal clock configured to posix timestamp %d", __FUNCTION__, internal_posix_time);
392395
return State::ConnectMqttBroker;
393396
}

0 commit comments

Comments
 (0)