Ver código fonte

Fix build with -Wundef

Part of https://github.com/mongoose-os-libs/vfs-fs-lfs/issues/2
Deomid "rojer" Ryabkov 6 anos atrás
pai
commit
303ffb2da4
2 arquivos alterados com 2 adições e 2 exclusões
  1. 1 1
      Makefile
  2. 1 1
      lfs.c

+ 1 - 1
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
 

+ 1 - 1
lfs.c

@@ -1500,7 +1500,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