Skip to contentSkip to conversation

jffs2: Fix set but not used warning

PATCH In review Tom Rini 1 participant 2 messages Mar 27, 2016 – Apr 2, 2016 Journalling flash file system V2 (JFFS2)

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 jffs2: Fix set but not used warning

We only use 'ofs' in jffs2_sum_scan_sumnode when debugging as it's part of a dbg_summary call. Mark this as __maybe_unused.

---
 fs/jffs2/jffs2_1pass.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/jffs2/jffs2_1pass.c +2 -1
index 64f5542..ba038b1 100644
@@ -115,6 +115,7 @@
 #include <config.h>
 #include <malloc.h>
 #include <div64.h>
+#include <linux/compiler.h>
 #include <linux/stat.h>
 #include <linux/time.h>
 #include <watchdog.h>
@@ -1328,7 +1329,7 @@ int jffs2_sum_scan_sumnode(struct part_info *part, uint32_t offset,
 			   struct b_lists *pL)
 {
 	struct jffs2_unknown_node crcnode;
-	int ret, ofs;
+	int ret, __maybe_unused ofs;
 	uint32_t crc;
 
 	ofs = part->sector_size - sumsize;
Signature · 1 line
1.7.9.5
author
#1 lore raw
Quoted 4 lines · Tom Rini

We only use 'ofs' in jffs2_sum_scan_sumnode when debugging as it's part of a dbg_summary call. Mark this as __maybe_unused.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160401/df4f8354/attachment.sig>