On 23:13 Sat 13 Dec     , Wolfgang Denk wrote:
> Hello,
> 
> building U-Boot with recent toolchains (like GCC-4.3.2) results in
> this warning:
> 
> fat.c: In function 'read_bootsectandvi':
> fat.c:707: warning: array subscript is above array bounds
> 
> The respective code looks like this:
> 
> fs/fat/fat.c:
> 
>  705         /* Terminate fs_type string. Writing past the end of vistart
>  706            is ok - it's just the buffer. */
>  707         vistart->fs_type[8] = '\0';

why not do something like this

        *(vistart + sizeof(volume_info)) = '\0';

Best Regards,
J.
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to