Re: Sun Studio compiler warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Sun Studio compiler warnings
Date
Msg-id 13234.1225377142@sss.pgh.pa.us
Whole thread Raw
In response to Sun Studio compiler warnings  (Peter Eisentraut <peter_e@gmx.net>)
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Sun Studio compiler warnings
Next
From: Zdenek Kotala
Date:
Subject: Re: Block-level CRC checks