]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: fti2c010: fix compiler warning on paddr[]
authorKuo-Jung Su <dantesu@faraday-tech.com>
Mon, 30 Dec 2013 09:20:57 +0000 (17:20 +0800)
committerHeiko Schocher <hs@denx.de>
Mon, 13 Jan 2014 07:18:38 +0000 (08:18 +0100)
This fixes the following compiler warnings:

fti2c010.c: In function 'fti2c010_read':
fti2c010.c:204:8: warning: 'paddr' may be used uninitialized in this function [-Wuninitialized]
fti2c010.c: In function 'fti2c010_write':
fti2c010.c:266:8: warning: 'paddr' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com>
Cc: Heiko Schocher <hs@denx.de>
drivers/i2c/fti2c010.c

index fb9fa353d108c48e145e567f1d25a14d0f8d9341..68d9a429129a6a5c0a69349f4bd153b45f0c969f 100644 (file)
@@ -201,7 +201,7 @@ static int fti2c010_read(struct i2c_adapter *adap,
        struct fti2c010_chip *chip = chip_list + adap->hwadapnr;
        struct fti2c010_regs *regs = chip->regs;
        int ret, pos;
-       uchar paddr[4];
+       uchar paddr[4] = { 0 };
 
        to_i2c_addr(paddr, addr, alen);
 
@@ -263,7 +263,7 @@ static int fti2c010_write(struct i2c_adapter *adap,
        struct fti2c010_chip *chip = chip_list + adap->hwadapnr;
        struct fti2c010_regs *regs = chip->regs;
        int ret, pos;
-       uchar paddr[4];
+       uchar paddr[4] = { 0 };
 
        to_i2c_addr(paddr, addr, alen);