explicit (void *) casts

Started by Kevin Grittnerover 15 years ago3 messages
#1Kevin Grittner
Kevin.Grittner@wicourts.gov

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kevin Grittner (#1)
Re: explicit (void *) casts

"Kevin Grittner" <Kevin.Grittner@wicourts.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

#3Kevin Grittner
Kevin.Grittner@wicourts.gov
In reply to: Tom Lane (#2)
Re: explicit (void *) casts

Tom Lane <tgl@sss.pgh.pa.us> wrote:

Any particular place where you think it's unnecessary?

How about the 2nd (tag pointer) parameter for hash_search?

-Kevin