Skip to content

Commit 86308eb

Browse files
committed
Fix compiler warning on Arduino Core 2
1 parent d07595c commit 86308eb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/WebHandlers.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,7 @@ void AsyncStaticWebHandler::handleRequest(AsyncWebServerRequest *request) {
237237
size_t fileSize = request->_tempFile.size();
238238
etagValue = static_cast<uint32_t>(fileSize);
239239
}
240-
#ifndef ESP8266
241-
snprintf(etag, sizeof(etag), "%08lx", etagValue);
242-
#else
243-
snprintf(etag, sizeof(etag), "%08x", etagValue);
244-
#endif
240+
snprintf(etag, sizeof(etag), "%08" PRIx32, etagValue);
245241
} else {
246242
etag[0] = '\0';
247243
}

0 commit comments

Comments
 (0)