Re: Sun Studio compiler warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Sun Studio compiler warnings
Date: 2008-10-30 14:32:22
Message-ID: 13234.1225377142@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2008-10-30 14:33:30 Re: Block-level CRC checks
Previous Message Peter Eisentraut 2008-10-30 14:24:07 Sun Studio compiler warnings