Skip to content

Commit b67b782

Browse files
authored
Fix compilation warning (#1740)
Compiler warning : format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t' he compiler warning arises because the format specifier %lu expects a long unsigned int, but the variable free is of type uint32_t (which is typically unsigned int). The ESP32, part of the Espressif32 family, typically defines uint32_t as unsigned int, so using the %u format specifier is appropriate.
1 parent 8e4c612 commit b67b782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WiFiManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3402,7 +3402,7 @@ void WiFiManager::DEBUG_WM(wm_debuglevel_t level,Generic text,Genericb textb) {
34023402
uint32_t free = info.total_free_bytes;
34033403
uint16_t max = info.largest_free_block;
34043404
uint8_t frag = 100 - (max * 100) / free;
3405-
_debugPort.printf("[MEM] free: %5lu | max: %5u | frag: %3u%% \n", free, max, frag);
3405+
_debugPort.printf("[MEM] free: %5u | max: %5u | frag: %3u%% \n", free, max, frag);
34063406
#endif
34073407
}
34083408

0 commit comments

Comments
 (0)