From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 6 Mar 2015 10:47:28 -0500 Subject: [U-Boot] common/board_f: implement type casting for gd structure In-Reply-To: <1424876342-12200-1-git-send-email-abrodkin@synopsys.com> References: <1424876342-12200-1-git-send-email-abrodkin@synopsys.com> Message-ID: <20150306154728.GD25373@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Cc: Simon Glass > Cc: Tom Rini > Acked-by: Simon Glass 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: