public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 2/2] fsl: sys_eeprom: Fix 'may be used uninitialized' warning
@ 2009-09-01 16:59 Anton Vorontsov
  2009-09-01 17:30 ` Kumar Gala
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Anton Vorontsov @ 2009-09-01 16:59 UTC (permalink / raw)
  To: u-boot

The warning is bogus, so silence it with uninitialized_var().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 board/freescale/common/sys_eeprom.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index c0fff68..a765b39 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -24,6 +24,7 @@
  */
 
 #include <common.h>
+#include <compiler.h>
 #include <command.h>
 #include <i2c.h>
 #include <linux/ctype.h>
@@ -204,7 +205,8 @@ static void update_crc(void)
  */
 static int prog_eeprom(void)
 {
-	int ret, i;
+	int uninitialized_var(ret);
+	int i;
 	void *p;
 #ifdef CONFIG_SYS_EEPROM_BUS_NUM
 	unsigned int bus;
-- 
1.6.3.3

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

end of thread, other threads:[~2009-09-04 20:57 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-01 16:59 [U-Boot] [PATCH 2/2] fsl: sys_eeprom: Fix 'may be used uninitialized' warning Anton Vorontsov
2009-09-01 17:30 ` Kumar Gala
2009-09-01 17:38   ` Anton Vorontsov
2009-09-01 17:59     ` [U-Boot] invalid core multipliers? Kári Davíðsson
2009-09-04 20:57       ` Wolfgang Denk
2009-09-01 18:06     ` [U-Boot] [PATCH 2/2] fsl: sys_eeprom: Fix 'may be used uninitialized' warning Anton Vorontsov
2009-09-01 18:09       ` Timur Tabi
2009-09-01 18:27         ` [U-Boot] [PATCH 2/2] fsl: sys_eeprom: Fix 'may be used uninitialized' warningп Anton Vorontsov
2009-09-01 19:22       ` [U-Boot] [PATCH 2/2] fsl: sys_eeprom: Fix 'may be used uninitialized' warning Wolfgang Denk
2009-09-01 18:16 ` Wolfgang Denk
2009-09-01 18:29   ` Anton Vorontsov
2009-09-01 19:42     ` Wolfgang Denk
2009-09-01 18:38 ` Timur Tabi

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