mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mtd-core: fix compiler warning
@ 2013-01-16 21:06 Alexander Aring
  2013-01-17  7:14 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Aring @ 2013-01-16 21:06 UTC (permalink / raw)
  To: barebox

Got this compile warning if MTD_WRITE support isn't set.

drivers/mtd/core.c: In function 'mtd_ioctl':
drivers/mtd/core.c:117:26: warning: unused variable 'ei' [-Wunused-variable]

Add a #ifdef to declaration of variable 'ei' to solve it.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 drivers/mtd/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index af6e195..070fda6 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -114,7 +114,9 @@ int mtd_ioctl(struct cdev *cdev, int request, void *buf)
 	struct mtd_ecc_stats *ecc = buf;
 #endif
 	struct region_info_user *reg = buf;
+#ifdef CONFIG_MTD_WRITE
 	struct erase_info_user *ei = buf;
+#endif
 	loff_t *offset = buf;
 
 	switch (request) {
-- 
1.8.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-17  7:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-16 21:06 [PATCH] mtd-core: fix compiler warning Alexander Aring
2013-01-17  7:14 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox