Hi Heiko,

On Tue,  3 Feb 2015 11:10:19 +0100
Heiko Schocher <h...@denx.de> wrote:

> executing "tools/buildman/buildman mpc5xx" drops this warning:
> 
> common/spl/spl_nor.c: In function 'spl_nor_load_image':
> common/spl/spl_nor.c:26:10: warning: assignment discards 'const' qualifier 
> from pointer target type [enabled by default]
> 
> fix this.
> 
> Signed-off-by: Heiko Schocher <h...@denx.de>
> ---
> 
>  common/spl/spl_nor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
> index 2c0e8e0..dcba2e0 100644
> --- a/common/spl/spl_nor.c
> +++ b/common/spl/spl_nor.c
> @@ -23,7 +23,7 @@ void spl_nor_load_image(void)
>                * Load Linux from its location in NOR flash to its defined
>                * location in SDRAM
>                */
> -             header = (const struct image_header *)CONFIG_SYS_OS_BASE;
> +             header = (struct image_header *)CONFIG_SYS_OS_BASE;
>  
>               if (image_get_os(header) == IH_OS_LINUX) {
>                       /* happy - was a Linux */
> -- 
> 2.1.0



I think you are doing wrong to just suppress the warning.


Both image_get_os() and spl_parse_image_header() expect
"const struct image_header *" argument.

Add "const" to "struct image_header *header;"




Best Regards
Masahiro Yamada

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to