[UBI] drivers/mtd/ubi/scan.c: fix uninitialized var warning

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sun Feb 3 02:59:01 EST 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=9308758c50610c077ca41e82c4b98b2de96e8387
Commit:     9308758c50610c077ca41e82c4b98b2de96e8387
Parent:     4354c5a4ef8d484a463ed8d996e9653ad8be5c72
Author:     akpm at linux-foundation.org <akpm at linux-foundation.org>
AuthorDate: Wed Jan 16 02:48:49 2008 -0800
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Sun Feb 3 18:10:00 2008 +1100

    [UBI] drivers/mtd/ubi/scan.c: fix uninitialized var warning
    
    drivers/mtd/ubi/scan.c: In function 'ubi_scan':
    drivers/mtd/ubi/scan.c:772: warning: 'ec' may be used uninitialized in this function
    
    Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/ubi/scan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index c7b0afc..c57e8ef 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -769,7 +769,7 @@ struct ubi_scan_leb *ubi_scan_get_free_peb(struct ubi_device *ubi,
  */
 static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si, int pnum)
 {
-	long long ec;
+	long long uninitialized_var(ec);
 	int err, bitflips = 0, vol_id, ec_corr = 0;
 
 	dbg_bld("scan PEB %d", pnum);



More information about the linux-mtd-cvs mailing list