Commit b8032734 authored by Kim Phillips's avatar Kim Phillips Committed by Wolfgang Denk
Browse files

ext2fs: fix warning: 'blocknxt' may be used uninitialized

This warning was introduced in 436da3cd

 "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 <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>
Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
parent 8b6a4952
...@@ -438,7 +438,7 @@ int ext2fs_read_file ...@@ -438,7 +438,7 @@ int ext2fs_read_file
} }
/* grab middle blocks in one go */ /* 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 oldblk = blknr;
int blocknxt; int blocknxt;
while (i < blockcnt - 1) { while (i < blockcnt - 1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment