Merge branch 'fix/spiffs_log_errors' into 'master'

fix(spiffs): SPIFFS print formatter errors out

Closes IDFGH-10696

See merge request espressif/esp-idf!25363
This commit is contained in:
Martin Vychodil 2023-08-16 20:13:01 +08:00
commit 4b79eef791
2 changed files with 11 additions and 7 deletions

View File

@ -1,12 +1,13 @@
idf_build_get_property(target IDF_TARGET)
list(APPEND srcs "spiffs_api.c"
"spiffs/src/spiffs_cache.c"
set(original_srcs "spiffs/src/spiffs_cache.c"
"spiffs/src/spiffs_check.c"
"spiffs/src/spiffs_gc.c"
"spiffs/src/spiffs_hydrogen.c"
"spiffs/src/spiffs_nucleus.c")
list(APPEND srcs "spiffs_api.c" ${original_srcs})
if(NOT ${target} STREQUAL "linux")
list(APPEND pr bootloader_support esptool_py vfs)
list(APPEND srcs "esp_spiffs.c")
@ -21,3 +22,6 @@ idf_component_register(SRCS ${srcs}
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
set_source_files_properties(spiffs/src/spiffs_nucleus.c PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation)
endif()
# Upstream SPIFFS code uses format specifiers in debug logging macros inconsistently
set_source_files_properties(${original_srcs} PROPERTIES COMPILE_FLAGS -Wno-format)

View File

@ -71,7 +71,7 @@ extern void spiffs_api_unlock(struct spiffs_t *fs);
// Defines spiffs debug print formatters
// some general signed number
#define _SPIPRIi "%d"
#define _SPIPRIi "%"PRIdMAX
// address
#define _SPIPRIad "%08x"
// block