Re: Something's been bugging me - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Something's been bugging me
Date
Msg-id 6717.1191193188@sss.pgh.pa.us
Whole thread Raw
In response to Re: Something's been bugging me  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Something's been bugging me
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> Why do you cast arguments to memcmp to char* ?

Well, *I* haven't done it in a long time, but it used to be a fairly
standard thing.  I imagine that back before memcpy was usually declared
with void * arguments, it was necessary to avoid compiler warnings.

The problem would still exist if the code were writtenmemcpy((void *) &foo, ...)
so I suspect that an in-line cast to void * wouldn't work any better.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Latest ecpg patch broke MSVC build
Next
From: Gregory Stark
Date:
Subject: Re: Something's been bugging me