Skip to content

Commit

Permalink
[fdb] Fixes to build for IDF w/o errors (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
anujdeshpande authored Apr 24, 2024
1 parent 77801ce commit 86d00aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions demos/esp32_spi_flash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion samples/tsdb_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/fdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 86d00aa

Please sign in to comment.