Re: windows consolidated cleanup

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: windows consolidated cleanup
Дата
Msg-id 4DB46236.80601@dunslane.net
обсуждение исходный текст
Ответ на Re: windows consolidated cleanup  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 04/24/2011 12:14 PM, Tom Lane wrote:
> Peter Eisentraut<peter_e@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: windows consolidated cleanup
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Unlogged tables, persistent kind