[PATCH v2] mkfs.ubifs: fix compiler warning for WITHOUT_LZO

Daniel Walter dwalter at sigma-star.at
Thu Nov 12 03:52:09 PST 2015


Fix compiler warning about an unused variable.

ubifs-utils/mkfs.ubifs/compr.c:41:27: warning: ‘c’ defined but not used [-Wunused-variable]
 static struct ubifs_info *c = &info_;


Signed-off-by: Daniel Walter <dwalter at sigma-star.at>
---
Changes since v1:
   * added exact compiler warning to commit message as requested
---
 ubifs-utils/mkfs.ubifs/compr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ubifs-utils/mkfs.ubifs/compr.c b/ubifs-utils/mkfs.ubifs/compr.c
index d534f10..8eff186 100644
--- a/ubifs-utils/mkfs.ubifs/compr.c
+++ b/ubifs-utils/mkfs.ubifs/compr.c
@@ -38,7 +38,9 @@
 
 static void *lzo_mem;
 static unsigned long long errcnt = 0;
+#ifndef WITHOUT_LZO
 static struct ubifs_info *c = &info_;
+#endif
 
 #define DEFLATE_DEF_LEVEL     Z_DEFAULT_COMPRESSION
 #define DEFLATE_DEF_WINBITS   11
-- 
2.6.2




More information about the linux-mtd mailing list