[fdb] Fixes to build for IDF w/o errors (#293)

This commit is contained in:
Anuj Deshpande 2024-04-24 17:54:11 +05:30 committed by GitHub
parent 77801ce3e4
commit 86d00aa5fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -7,4 +7,6 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
list(APPEND EXTRA_COMPONENT_DIRS
"${CMAKE_CURRENT_LIST_DIR}/components")
add_compile_definitions(FDB_USING_TIMESTAMP_64BIT)
project(esp32_spi_flash)
idf_build_set_property(COMPILE_OPTIONS "-Wno-error=maybe-uninitialized" APPEND)

View File

@ -21,7 +21,7 @@
#define FDB_LOG_TAG "[sample][tsdb]"
#ifdef FDB_USING_TIMESTAMP_64BIT
#define __PRITS "ld"
#define __PRITS "lld"
#else
#define __PRITS "d"
#endif

View File

@ -74,7 +74,7 @@ fdb_err_t _fdb_init_ex(fdb_db_t db, const char *name, const char *path, fdb_db_t
} else {
/* must be aligned with block size */
if (db->sec_size % block_size != 0) {
FDB_INFO("Error: db sector size (%" PRIu32 ") MUST align with block size (%" PRIu32 ").\n", db->sec_size, block_size);
FDB_INFO("Error: db sector size (%" PRIu32 ") MUST align with block size (%zu).\n", db->sec_size, block_size);
return FDB_INIT_FAILED;
}
}