From: Kim Phillips Date: Tue, 3 Jul 2012 22:41:56 +0000 (-0500) Subject: ext2fs: fix warning: 'blocknxt' may be used uninitialized X-Git-Tag: v2012.07-rc1~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b803273;p=u-boot ext2fs: fix warning: 'blocknxt' may be used uninitialized This warning was introduced in 436da3c "ext2load: increase read speed": ext2fs.c: In function 'ext2fs_read_file': ext2fs.c:458:19: warning: 'blocknxt' may be used uninitialized in this function [-Wuninitialized] this change makes it go away. Cc: Eric Nelson Cc: Thierry Reding Cc: Jason Cooper Cc: Andreas Bießmann Cc: Reinhard Arlt Signed-off-by: Kim Phillips --- diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c index f1fce48a39..182f0acaca 100644 --- a/fs/ext2/ext2fs.c +++ b/fs/ext2/ext2fs.c @@ -438,7 +438,7 @@ int ext2fs_read_file } /* grab middle blocks in one go */ - if (i != pos / blocksize && i != blockcnt - 1 && blockcnt > 3) { + if (i != pos / blocksize && i < blockcnt - 1 && blockcnt > 3) { int oldblk = blknr; int blocknxt; while (i < blockcnt - 1) {