Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2019-08-09 02:50:40 +0300
committerGitHub <noreply@github.com>2019-08-09 02:50:40 +0300
commit494dd6673d008c03e3199b24af7bff0fe82017f1 (patch)
tree32328cf901dd15e8058d954e5ce850aa9d0176de
parentfce2569005da243d583830761a98f01e65e3ba78 (diff)
parent303ffb2da4786ea29e4f928a47465d2784a71790 (diff)
Merge pull request #263 from rojer/wundefv2.1.1
Fix build with -Wundef
-rw-r--r--Makefile2
-rw-r--r--lfs.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1acaec6..a22fc22 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ override CFLAGS += -DLFS_YES_TRACE
endif
override CFLAGS += -I.
override CFLAGS += -std=c99 -Wall -pedantic
-override CFLAGS += -Wextra -Wshadow -Wjump-misses-init
+override CFLAGS += -Wextra -Wshadow -Wjump-misses-init -Wundef
# Remove missing-field-initializers because of GCC bug
override CFLAGS += -Wno-missing-field-initializers
diff --git a/lfs.c b/lfs.c
index 06e37ac..b10c186 100644
--- a/lfs.c
+++ b/lfs.c
@@ -1502,7 +1502,7 @@ static int lfs_dir_compact(lfs_t *lfs,
end = begin;
}
}
-#if LFS_MIGRATE
+#ifdef LFS_MIGRATE
} else if (lfs_pair_cmp(dir->pair, lfs->root) == 0 && lfs->lfs1) {
// we can't relocate our root during migrations, as this would
// cause the superblock to get updated, which would clobber v1