Fixing trivial warnings
Jonas Bonn
jonas.bonn at gmail.com
Thu Oct 16 08:01:57 CEST 2008
On Thu, Oct 16, 2008 at 5:00 AM, Nelson Castillo <nelsoneci at gmail.com> wrote:
> From: Nelson Castillo <nelsoneci at gmail.com>
>
> This patch fixes: 'scratch' may be used uninitialized in this function.
> Let's add a remark because this initialization might be confusing.
> unsigned long flags;
> size_t blksize, len, chunk;
> - u32 scratch;
> + u32 scratch = 0; /* avoid warning - initialization below */
> u8 *buf;
>
> DBG("PIO reading\n");
>
>
I would have moved the definition of scratch to be inside the
while-loop where the variable is used.
/Jonas
More information about the openmoko-kernel
mailing list