mirror of
https://github.com/openharmony/third_party_backends.git
synced 2026-07-19 11:42:48 -04:00
md5: fix [-Wstrict-aliasing] compiler warnings
This commit is contained in:
@@ -133,8 +133,8 @@ md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
|
|||||||
memcpy (&ctx->buffer[bytes], fillbuf, pad);
|
memcpy (&ctx->buffer[bytes], fillbuf, pad);
|
||||||
|
|
||||||
/* Put the 64-bit file length in *bits* at the end of the buffer. */
|
/* 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] = SWAP (ctx->total[0] << 3);
|
||||||
*(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
|
((md5_uint32 *) ctx->buffer)[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
|
||||||
(ctx->total[0] >> 29));
|
(ctx->total[0] >> 29));
|
||||||
|
|
||||||
/* Process last bytes. */
|
/* Process last bytes. */
|
||||||
|
|||||||
Reference in New Issue
Block a user