mirror of
https://github.com/pellepl/spiffs.git
synced 2026-06-06 05:25:27 +00:00
Fix uninitialized variables
More strict warnings are enforcing `total` and `used` to be initialized as it seems that compiler is not happy with what `SPIFFS_info` does.
This commit is contained in:
@@ -1443,7 +1443,7 @@ s32_t SPIFFS_vis(spiffs *fs) {
|
||||
spiffs_printf("page_alloc: "_SPIPRIi"\n", fs->stats_p_allocated);
|
||||
spiffs_printf("page_delet: "_SPIPRIi"\n", fs->stats_p_deleted);
|
||||
SPIFFS_UNLOCK(fs);
|
||||
u32_t total, used;
|
||||
u32_t total = 0u, used = 0u;
|
||||
SPIFFS_info(fs, &total, &used);
|
||||
spiffs_printf("used: "_SPIPRIi" of "_SPIPRIi"\n", used, total);
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user