Lists: | pgsql-hackers |
---|
From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | explicit (void *) casts |
Date: | 2010-04-28 18:21:49 |
Message-ID: | 4BD8366D0200002500031004@gw.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
I'm wondering the reason that I see (void *) casts for function call
parameters which are pointers to specific structures. Do some
compilers generate warnings if these are omitted? It's hard to
believe that the generated code would differ without them.
-Kevin
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: explicit (void *) casts |
Date: | 2010-04-28 18:34:48 |
Message-ID: | 4274.1272479688@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> I'm wondering the reason that I see (void *) casts for function call
> parameters which are pointers to specific structures. Do some
> compilers generate warnings if these are omitted?
There are some places where we do that to suppress warnings, yes.
Any particular place where you think it's unnecessary?
regards, tom lane
From: | "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: explicit (void *) casts |
Date: | 2010-04-28 18:39:28 |
Message-ID: | 4BD83A900200002500031008@gw.wicourts.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Any particular place where you think it's unnecessary?
How about the 2nd (tag pointer) parameter for hash_search?
-Kevin