Re: Sun Studio compiler warnings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Sun Studio compiler warnings
Дата
Msg-id 13234.1225377142@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Sun Studio compiler warnings  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> CMPFUNC(tsquery_lt, res < 0);
> CMPFUNC(tsquery_le, res <= 0);
> CMPFUNC(tsquery_eq, res == 0);
> CMPFUNC(tsquery_ge, res >= 0);
> CMPFUNC(tsquery_gt, res > 0);
> CMPFUNC(tsquery_ne, res != 0);

> The closing semicolon is strictly speaking not allowed here.  We could 
> remove it, but that would probably upset pgindent?

If the warnings annoy you, do what PG_FUNCTION_INFO_V1 does.

#define PG_FUNCTION_INFO_V1(funcname) \
extern PGDLLIMPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
const Pg_finfo_record * \
CppConcat(pg_finfo_,funcname) (void) \
{ \static const Pg_finfo_record my_finfo = { 1 }; \return &my_finfo; \
} \
extern int no_such_variable

        regards, tom lane


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Sun Studio compiler warnings
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Re: Block-level CRC checks