Re: Something's been bugging me

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Something's been bugging me
Дата
Msg-id 6717.1191193188@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Something's been bugging me  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: Something's been bugging me  (Gregory Stark <stark@enterprisedb.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Latest ecpg patch broke MSVC build
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: Something's been bugging me