Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group