Ignore:
Timestamp:
Jan 24, 2017 5:41:05 AM (6 years ago)
Author:
nanang
Message:

Misc (re #1945): Fixed compile warnings on Android 64bit platforms, e.g: dereferencing type-punned pointer, using uninitialized var.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib-util/src/pjlib-util/md5.c

    r4614 r5544  
    152152 
    153153    /* Append length in bits and transform */ 
    154     ((pj_uint32_t *) ctx->in)[14] = ctx->bits[0]; 
    155     ((pj_uint32_t *) ctx->in)[15] = ctx->bits[1]; 
     154    //((pj_uint32_t *) ctx->in)[14] = ctx->bits[0]; 
     155    //((pj_uint32_t *) ctx->in)[15] = ctx->bits[1]; 
     156    pj_memcpy(&ctx->in[14 << 2], &ctx->bits[0], sizeof(ctx->bits[0])); 
     157    pj_memcpy(&ctx->in[15 << 2], &ctx->bits[1], sizeof(ctx->bits[1])); 
    156158 
    157159    MD5Transform(ctx->buf, (pj_uint32_t *) ctx->in); 
Note: See TracChangeset for help on using the changeset viewer.