UBI: fix warnings
Old gcc complains: CC drivers/mtd/ubi/wl.o drivers/mtd/ubi/wl.c: In function 'wear_leveling_worker': drivers/mtd/ubi/wl.c:746: warning: 'pe' may be used uninitialized in this function CC drivers/mtd/ubi/scan.o drivers/mtd/ubi/scan.c: In function 'ubi_scan': drivers/mtd/ubi/scan.c:772: warning: 'ec' may be used uninitialized in this function drivers/mtd/ubi/scan.c:772: note: 'ec' was declared here Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
64203195ed
commit
c18a84186c
2 changed files with 2 additions and 2 deletions
|
@ -773,7 +773,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)
|
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;
|
int err, bitflips = 0, vol_id, ec_corr = 0;
|
||||||
|
|
||||||
dbg_bld("scan PEB %d", pnum);
|
dbg_bld("scan PEB %d", pnum);
|
||||||
|
|
|
@ -743,7 +743,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
|
||||||
int cancel)
|
int cancel)
|
||||||
{
|
{
|
||||||
int err, put = 0, scrubbing = 0, protect = 0;
|
int err, put = 0, scrubbing = 0, protect = 0;
|
||||||
struct ubi_wl_prot_entry *pe;
|
struct ubi_wl_prot_entry *uninitialized_var(pe);
|
||||||
struct ubi_wl_entry *e1, *e2;
|
struct ubi_wl_entry *e1, *e2;
|
||||||
struct ubi_vid_hdr *vid_hdr;
|
struct ubi_vid_hdr *vid_hdr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue