Re: fix for strict-alias warnings

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PG Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix for strict-alias warnings
Date: 2003-10-11 19:55:22
Message-ID: 200310111955.h9BJtMK10256@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
> > The proc.c cases were using MemSet, which was checking if the
> > int* as aligned for int* access. In fact, we could change MemSet to
> > always take a void *, and do the int* casting when we access it after
> > testing for alignment.
> >
>
> Since MemSet is generic, that is probably a good idea.

I have applied the following patch to add an additional void* cast to
MemSet, and added a comment that this was safe because alignment is
checked below --- patch attached.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 709 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-10-11 20:22:31 Re: [PATCHES] fix for strict-alias warnings
Previous Message Andrew Dunstan 2003-10-11 18:41:22 Re: fix for strict-alias warnings

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-10-11 20:22:31 Re: [PATCHES] fix for strict-alias warnings
Previous Message Andrew Dunstan 2003-10-11 18:41:22 Re: fix for strict-alias warnings