md5.c: In function ‘MD5Final’:
md5.c:154:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
md5.c:155:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
There is an md5 unit test and it still passes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364462
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
{
unsigned count;
unsigned char *p;
{
unsigned count;
unsigned char *p;
/* Compute number of bytes mod 64 */
count = (ctx->bits[0] >> 3) & 0x3F;
/* Compute number of bytes mod 64 */
count = (ctx->bits[0] >> 3) & 0x3F;
byteReverse(ctx->in, 14);
/* Append length in bits and transform */
byteReverse(ctx->in, 14);
/* Append length in bits and transform */
- ((uint32_t *) ctx->in)[14] = ctx->bits[0];
- ((uint32_t *) ctx->in)[15] = ctx->bits[1];
+ in_buf = (uint32_t *) ctx->in;
+ in_buf[14] = ctx->bits[0];
+ in_buf[15] = ctx->bits[1];
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);