diff options
| author | Damien George <damien@micropython.org> | 2022-05-17 16:37:33 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-05-24 12:51:17 +1000 |
| commit | 3a544b832b392abbb05c085b296a6cc1a7328397 (patch) | |
| tree | 751c1ce12984881a78c8183ad56b9ae5d5a60067 | |
| parent | 115a23da2413e2161418864ad1f699aec8797062 (diff) | |
lib/littlefs: Guard lfs2_file_rawopen with LFS2_NO_MALLOC.
To prevent warnings about this function being unused when malloc is
disabled.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | lib/littlefs/lfs2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/littlefs/lfs2.c b/lib/littlefs/lfs2.c index b708196d0..10f1691c4 100644 --- a/lib/littlefs/lfs2.c +++ b/lib/littlefs/lfs2.c @@ -2998,12 +2998,14 @@ cleanup: return err; } +#ifndef LFS2_NO_MALLOC static int lfs2_file_rawopen(lfs2_t *lfs2, lfs2_file_t *file, const char *path, int flags) { static const struct lfs2_file_config defaults = {0}; int err = lfs2_file_rawopencfg(lfs2, file, path, flags, &defaults); return err; } +#endif static int lfs2_file_rawclose(lfs2_t *lfs2, lfs2_file_t *file) { #ifndef LFS2_READONLY |
