From 4904ee5a9d1871033dc206c7d860a2b50fda2ce1 Mon Sep 17 00:00:00 2001 From: Henry Gabryjelski Date: Sat, 5 Oct 2019 18:02:26 -0700 Subject: [PATCH] Fix printf format specifier to match length of data type. Here, LFS uses an int for return value, which is 16-bit. The VERIFY_MESS expects a 32-bit value, so cast here at the boundary between the two sets of files. --- libraries/Adafruit_LittleFS/src/Adafruit_LittleFS.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Adafruit_LittleFS/src/Adafruit_LittleFS.h b/libraries/Adafruit_LittleFS/src/Adafruit_LittleFS.h index 2861ee75..4514646a 100644 --- a/libraries/Adafruit_LittleFS/src/Adafruit_LittleFS.h +++ b/libraries/Adafruit_LittleFS/src/Adafruit_LittleFS.h @@ -83,7 +83,7 @@ class Adafruit_LittleFS #define PRINT_LFS_ERR(_err) #else #define VERIFY_LFS(...) _GET_3RD_ARG(__VA_ARGS__, VERIFY_ERR_2ARGS, VERIFY_ERR_1ARGS)(__VA_ARGS__, dbg_strerr_lfs) - #define PRINT_LFS_ERR(_err) VERIFY_MESS(_err, dbg_strerr_lfs) + #define PRINT_LFS_ERR(_err) VERIFY_MESS((long int)_err, dbg_strerr_lfs) // LFS_ERR are of type int, VERIFY_MESS expects long_int const char* dbg_strerr_lfs (int32_t err); #endif