md5: fix [-Wstrict-aliasing] compiler warnings

merge-requests/1/head
Olaf Meeuwissen 2016-09-07 21:03:30 +09:00
rodzic 27a4da41b1
commit 39ceeae616
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -133,8 +133,8 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
memcpy (&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) |
((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));
/* Process last bytes. */