[coreboot] Warnings

Myles Watson mylesgw at gmail.com
Fri Apr 30 22:17:20 CEST 2010


>> src/northbridge/amd/lx/raminit.c:334: warning: array subscript is
>> above array bounds
>>
>>
>> Marc indicated, this could be a compiler "problem". We could maybe add an
>> explicit check for the array index.
>
> It looks like it's being indexed by a function that's built into the
> compiler that returns bit positions.  Since the return value could be
> up to 31, I think it's a correct warning (the array's only got 8
> elements.)

This patch fixes the warnings.  All I did was factor out the identical
code into a function, and remove some unnecessary casts.  So I guess I
was wrong.

Signed-off-by: Myles Watson <mylesgw at gmail.com>

Thanks,
Myles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lx.diff
Type: text/x-patch
Size: 6644 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100430/0151144b/attachment.diff>


More information about the coreboot mailing list