summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2012-04-29 00:28:40 +0200
committerWolfgang Denk <wd@denx.de>2012-04-29 14:14:08 +0200
commitb68d63ce4bf780bcb7d1af917d3b44413cf1206f (patch)
tree0599b3a1f1e4046a6e113ab89da4329272f3e5bf /lib
parentf624dd15e3602d6b29b191f42388c182aaa1a855 (diff)
downloadu-boot-imx-b68d63ce4bf780bcb7d1af917d3b44413cf1206f.zip
u-boot-imx-b68d63ce4bf780bcb7d1af917d3b44413cf1206f.tar.gz
u-boot-imx-b68d63ce4bf780bcb7d1af917d3b44413cf1206f.tar.bz2
GCC47: Fix warning in md5.c
md5.c: In function ‘MD5Final’: md5.c:156:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] md5.c:157:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Signed-off-by: Marek Vasut <marex@denx.de> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/md5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/md5.c b/lib/md5.c
index 81a09e3..2ae4a06 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -153,8 +153,8 @@ MD5Final(unsigned char digest[16], struct MD5Context *ctx)
byteReverse(ctx->in, 14);
/* 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];
MD5Transform(ctx->buf, (__u32 *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);