[U-Boot] [PATCH] board/esd/cpci405/cpci405.c: Fix GCC 4.6 warning

Mike Frysinger vapier at gentoo.org
Thu Nov 24 18:40:03 CET 2011


On Thursday 24 November 2011 10:39:21 Matthias Fuchs wrote:
> -	sprintf(str, "%08X%04X",
> -		*(unsigned int *)&ow_id[0],
> -		*(unsigned short *)&ow_id[4]);
> +	sprintf(str, "%02X%02X%02X%02X%02X%02X",
> +		ow_id[0], ow_id[1], ow_id[2], ow_id[3], ow_id[4], ow_id[5]);

use __get_unaligned_le32 and __get_unaligned_le16 helpers to avoid having to 
decode each byte.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111124/3a66dd7e/attachment.pgp>


More information about the U-Boot mailing list