On 04/24/2011 12:14 PM, Tom Lane wrote:
Peter Eisentraut<pete...@gmx.net> writes:
The hunk below looks a bit evil.
At least a comment would be good to explain why this is necessary.
Yeah, having to cast away const seems uglier than the original problem.
Can't we avoid that?
I'm not sure how, since the second argument to send() is declared const,
and the buf member of a WSABUF isn't. Why is this worse? The compiler
warning is effectively telling us that the compiler will be discarding
constness anyway, isn't it?
BTW, all of my machines as well as the Single Unix Spec are agreed that
the second argument to send() is "const void *", not "const char *".
If we're going to tweak this I think we should make it match exactly.
I'm OK with that - not sure if it will generate *more* casts or
warnings, though.
cheers
andrew
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers