Skip to content

Commit 4904ee5

Browse files
committed
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.
1 parent f0f6b10 commit 4904ee5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Adafruit_LittleFS/src/Adafruit_LittleFS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Adafruit_LittleFS
8383
#define PRINT_LFS_ERR(_err)
8484
#else
8585
#define VERIFY_LFS(...) _GET_3RD_ARG(__VA_ARGS__, VERIFY_ERR_2ARGS, VERIFY_ERR_1ARGS)(__VA_ARGS__, dbg_strerr_lfs)
86-
#define PRINT_LFS_ERR(_err) VERIFY_MESS(_err, dbg_strerr_lfs)
86+
#define PRINT_LFS_ERR(_err) VERIFY_MESS((long int)_err, dbg_strerr_lfs) // LFS_ERR are of type int, VERIFY_MESS expects long_int
8787

8888
const char* dbg_strerr_lfs (int32_t err);
8989
#endif

0 commit comments

Comments
 (0)