md5.c: Fix compiler warning (copy from gcc)

Origin commit data
------------------
Branch: ni/coolstream
Commit: 98511b686d
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2014-09-23 (Tue, 23 Sep 2014)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2014-09-23 18:49:23 +02:00
committed by [CST] Focus
parent e274e34962
commit 6285bc4dd8

View File

@@ -96,6 +96,7 @@ md5_finish_ctx (ctx, resbuf)
{
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
md5_uint32 swap_bytes;
size_t pad;
/* Now count remaining bytes. */
@@ -106,10 +107,13 @@ md5_finish_ctx (ctx, resbuf)
pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes;
memmove (&ctx->buffer[bytes], fillbuf, pad);
/* Put the 64-bit file length in *bits* at the end of the buffer. */
*(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
*(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
(ctx->total[0] >> 29));
/* Put the 64-bit file length in *bits* at the end of the buffer.
Use memcpy to avoid aliasing problems. On most systems, this
will be optimized away to the same code. */
swap_bytes = SWAP (ctx->total[0] << 3);
memcpy (&ctx->buffer[bytes + pad], &swap_bytes, sizeof (swap_bytes));
swap_bytes = SWAP ((ctx->total[1] << 3) | (ctx->total[0] >> 29));
memcpy (&ctx->buffer[bytes + pad + 4], &swap_bytes, sizeof (swap_bytes));
/* Process last bytes. */
md5_process_block (ctx->buffer, bytes + pad + 8, ctx);