[U-Boot] common/board_f: implement type casting for gd structure

Tom Rini trini at konsulko.com
Fri Mar 6 16:47:28 CET 2015


On Wed, Feb 25, 2015 at 05:59:02PM +0300, Alexey Brodkin wrote:

> In case of global data structure defined as "register volatile" compiler
> throws an warning about incorrect type used:
>  --->8---
>  common/board_f.c: In function "board_init_f_r":
>  common/board_f.c:1073:2: warning: passing argument 1 of "&board_init_r
>  +(sizetype)gd->reloc_off" discards "volatile" qualifier from pointer
>  target type [enabled by default]
>   (board_init_r + gd->reloc_off)(gd, gd->relocaddr);
>   ^
>  common/board_f.c:1073:2: note: expected "struct gd_t *" but argument is
>  of type "volatile struct gd_t *"
>  --->8---
> 
> An obvious fix is manual casting to "gd_t *".
> 
> Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tom Rini <trini at ti.com>
> Acked-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150306/3bfee7e2/attachment.sig>


More information about the U-Boot mailing list