mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
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.
This commit is contained in:
+1
-1
@@ -3402,7 +3402,7 @@ void WiFiManager::DEBUG_WM(wm_debuglevel_t level,Generic text,Genericb textb) {
|
||||
uint32_t free = info.total_free_bytes;
|
||||
uint16_t max = info.largest_free_block;
|
||||
uint8_t frag = 100 - (max * 100) / free;
|
||||
_debugPort.printf("[MEM] free: %5lu | max: %5u | frag: %3u%% \n", free, max, frag);
|
||||
_debugPort.printf("[MEM] free: %5u | max: %5u | frag: %3u%% \n", free, max, frag);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user