[U-Boot] [PATCH] common/lcd: fix eldk 4.2 compile warning

Marek Vasut marex at denx.de
Tue Oct 23 14:14:09 CEST 2012


Dear Andreas Bießmann,

> This fixes following warning only generated with eldk-4.2:
> 
> ---8<---
> lcd.c: In function 'bitmap_plot':
> lcd.c:527: warning: dereferencing type-punned pointer will break
> strict-aliasing rules --->8---
> 
> Signed-off-by: Andreas Bießmann <andreas.devel at googlemail.com>
> Cc: Marek Vasut <marex at denx.de>
> ---
>  common/lcd.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/lcd.c b/common/lcd.c
> index b6be800..9a4435f 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c
> @@ -524,7 +524,7 @@ static inline ushort *configuration_get_cmap(void)
>  void bitmap_plot(int x, int y)
>  {
>  #ifdef CONFIG_ATMEL_LCD
> -	uint *cmap = (uint *)bmp_logo_palette;
> +	uint *cmap = (void *)bmp_logo_palette;

Are you _sure_ this is the right fix ? Why is the atmel LCD driver so separate 
anyway?

Thanks!

>  #else
>  	ushort *cmap = (ushort *)bmp_logo_palette;
>  #endif

Best regards,
Marek Vasut


More information about the U-Boot mailing list