lib/littlefs: Guard lfs2_mlist_isopen with LFS2_NO_ASSERT.

To prevent warnings about this function being unused when assertions are
disabled.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2020-12-09 13:18:22 +11:00
parent d9d761b057
commit 8a29319a15
1 changed files with 2 additions and 0 deletions

View File

@ -425,6 +425,7 @@ static inline void lfs2_superblock_tole32(lfs2_superblock_t *superblock) {
superblock->attr_max = lfs2_tole32(superblock->attr_max);
}
#ifndef LFS2_NO_ASSERT
static inline bool lfs2_mlist_isopen(struct lfs2_mlist *head,
struct lfs2_mlist *node) {
for (struct lfs2_mlist **p = &head; *p; p = &(*p)->next) {
@ -435,6 +436,7 @@ static inline bool lfs2_mlist_isopen(struct lfs2_mlist *head,
return false;
}
#endif
static inline void lfs2_mlist_remove(lfs2_t *lfs2, struct lfs2_mlist *mlist) {
for (struct lfs2_mlist **p = &lfs2->mlist; *p; p = &(*p)->next) {