This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libiberty/md5: fix strict alias warnings
- From: Ian Lance Taylor <iant at google dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 27 Jul 2012 11:45:51 -0700
- Subject: Re: libiberty/md5: fix strict alias warnings
- References: <201207271436.09109.vapier@gentoo.org>
On Fri, Jul 27, 2012 at 11:36 AM, Mike Frysinger <vapier@gentoo.org> wrote:
>
> 2012-07-27 Mike Frysinger <vapier@gentoo.org>
>
> * 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;
> + md5_uint32 swap_bytes, bytes = ctx->buflen;
Please add a new line, rather than declaring one uninitialized and one
initialized variable on the same line.
This patch is OK with that change.
Thanks.
Ian