[U-Boot] [PATCH 2/2] GCC47: Fix warning in md5.c

Mike Frysinger vapier at gentoo.org
Sun Apr 29 01:24:02 CEST 2012


On Saturday 28 April 2012 18:28:40 Marek Vasut wrote:
> --- a/include/u-boot/md5.h
> +++ b/include/u-boot/md5.h
> @@ -11,7 +11,10 @@
>  struct MD5Context {
>  	__u32 buf[4];
>  	__u32 bits[2];
> -	unsigned char in[64];
> +	union {
> +		unsigned char in[64];
> +		__u32 in32[16];
> +	};
>  };
> 
> --- a/lib/md5.c
> +++ b/lib/md5.c
> 
>  	/* Append length in bits and transform */
> -	((__u32 *) ctx->in)[14] = ctx->bits[0];
> -	((__u32 *) ctx->in)[15] = ctx->bits[1];
> +	ctx->in32[14] = ctx->bits[0];
> +	ctx->in32[15] = ctx->bits[1];

nice

Acked-by: Mike Frysinger <vapier at gentoo.org>
-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/20120428/9fbfbce6/attachment.pgp>


More information about the U-Boot mailing list