• Tom Rini's avatar
    ext2fs: fix warning: 'blocknxt' may be used uninitialized with gcc 4.2 · 94c1a20f
    Tom Rini authored
    The above warning was introduced originally in 436da3cd "ext2load:
    increase read speed" and fixed for newer toolchains in b8032734
    fix warning: 'blocknxt' may be used uninitialized".  This change did not
    fix the warning with gcc 4.2, as found in ELDK 4.2.
    If we rework the while loop to initalize blocknxt before entering the
    warning really goes away.  Tested on am335x with an approx 7mb file and
    crc32 in U-Boot befor and after this change.
    Cc: Wolfgang Denk <wd@denx.de>
    Cc: Eric Nelson <eric.nelson@boundarydevices.com>
    Cc: Thierry Reding <thierry.reding@avionic-design.de>
    Cc: Jason Cooper <u-boot@lakedaemon.net>
    Cc: Andreas Bießmann <andreas.devel@googlemail.com>
    Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
    Cc: Kim Phillips <kim.phillips@freescale.com>
    Signed-off-by: default avatarTom Rini <trini@ti.com>
ext2fs.c 21.8 KB