Re: libiberty/md5: fix strict alias warnings

2012-07-30 Thread Uros Bizjak
Hello! > > 2012-07-27 Mike Frysinger > > > > * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output > > to swap_bytes, and then call memcpy to move it to ctx->buffer. > > > >/* Take yet unprocessed bytes into account. */ > > - md5_uint32 bytes = ctx->buflen; >

Re: libiberty/md5: fix strict alias warnings

2012-07-27 Thread Ian Lance Taylor
On Fri, Jul 27, 2012 at 11:36 AM, Mike Frysinger wrote: > > 2012-07-27 Mike Frysinger > > * md5.c (md5_finish_ctx): Declare swap_bytes. Assign SWAP() output > to swap_bytes, and then call memcpy to move it to ctx->buffer. > >/* Take yet unprocessed bytes into account. */ >

libiberty/md5: fix strict alias warnings

2012-07-27 Thread Mike Frysinger
Current libiberty md5 code triggers these warnings with gcc-4.7.1 for me: libiberty/md5.c: In function ‘md5_finish_ctx’: libiberty/md5.c:117:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] libiberty/md5.c:118:3: warning: dereferencing type-punned