Re: fix for strict-alias warnings

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix for strict-alias warnings
Date: 2003-10-14 17:53:19
Message-ID: 3F8C380F.30608@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Peter Eisentraut wrote:

>Andrew Dunstan writes:
>
>
>
>>And looking at it even closer, 2 of the 3 cases of calling MemSet appear
>>to be unnecessary, as the zeroed out values are immediately overwritten.
>>
>>
>
>We need to zero out the holes in the structures so that hash functions
>work correctly.
>
>
>
I suspect we are both wrong :-) These structures aren't used in any
hashed structure that I can see, but the effect of the MemSet is to zero
out the it_interval value of the itimer, making sure the timer is a "one
shot" timer - so they are necessary after all, but for a different
reason (it's been a while since I used setitimer, and the man page is
less than a model of clarity).

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2003-10-14 17:58:24 create database that already exists.
Previous Message Mario Weilguni 2003-10-14 17:33:31 Stupid index idea...

Browse pgsql-patches by date

  From Date Subject
Next Message veramente@libero.it 2003-10-14 17:55:11 Italian NLS, pg_dump-it.po initial translation
Previous Message Peter Eisentraut 2003-10-14 17:48:47 Re: [Fwd: Make psql use all pretty print options]