md5/sha512: fix strict aliasing warnings
authorMike Frysinger <vapier@gentoo.org>
Wed, 19 Jun 2013 15:45:05 +0000 (11:45 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 19 Jun 2013 15:49:15 +0000 (11:49 -0400)
commitf6205c6ab786f14e3515dfc0bfdb958ada8ed0e9
treeeb9a33aa6a18faf1b292949ecf4a132e7cce76a1
parentfea25880212dd934c7e17fce8a299f9184933f6b
md5/sha512: fix strict aliasing warnings

If the target can tolerate these issues, then gcc is smart enough
to generate the same code (x86_64 produces the same code).  If the
target can't, then it needs the memcpy anyways.

libbb/hash_md5_sha.c: In function 'common64_end':
libbb/hash_md5_sha.c:87:4: warning:
  dereferencing type-punned pointer will break strict-aliasing rules
    *(uint64_t *) (&ctx->wbuffer[64 - 8]) = t;
libbb/hash_md5_sha.c: In function 'sha512_end':
libbb/hash_md5_sha.c:886:4: warning:
  dereferencing type-punned pointer will break strict-aliasing rules
    *(uint64_t *) (&ctx->wbuffer[128 - 8]) = t;
libbb/hash_md5_sha.c:889:4: warning:
  dereferencing type-punned pointer will break strict-aliasing rules
    *(uint64_t *) (&ctx->wbuffer[128 - 16]) = t;

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
libbb/hash_md5_sha.c