Thread: [PATCH] Compiler warning cleanup

[PATCH] Compiler warning cleanup

From
Zdenek Kotala
Date:
Attached patch fixes following sun studio compiler warning:

"tsquery_op.c", line 193: warning: syntax error:  empty declaration
"tsquery_op.c", line 194: warning: syntax error:  empty declaration
"tsquery_op.c", line 195: warning: syntax error:  empty declaration
"tsquery_op.c", line 196: warning: syntax error:  empty declaration
"tsquery_op.c", line 197: warning: syntax error:  empty declaration
"tsquery_op.c", line 198: warning: syntax error:  empty declaration
"tsvector_op.c", line 177: warning: syntax error:  empty declaration
"tsvector_op.c", line 178: warning: syntax error:  empty declaration
"tsvector_op.c", line 179: warning: syntax error:  empty declaration
"tsvector_op.c", line 180: warning: syntax error:  empty declaration
"tsvector_op.c", line 181: warning: syntax error:  empty declaration
"tsvector_op.c", line 182: warning: syntax error:  empty declaration
"tsvector_op.c", line 183: warning: syntax error:  empty declaration


    Thanks Zdenek

Attachment

Re: [PATCH] Compiler warning cleanup

From
Peter Eisentraut
Date:
On Saturday 23 May 2009 00:04:26 Zdenek Kotala wrote:
> Attached patch fixes following sun studio compiler warning:
>
> "tsquery_op.c", line 193: warning: syntax error:  empty declaration
[snip]

> --- 190,201 ----
>   PG_RETURN_BOOL( CONDITION );                \
>   }
>   
> ! 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)
>   
>   TSQuerySign
>   makeTSQuerySign(TSQuery a)

I think this is not the best way to do it, because it will confuse pgindent 
and editors and such.  The DATA() macros in include/catalog have this solved; 
see include/catalog/genbki.sh.


Re: [PATCH] Compiler warning cleanup

From
Zdenek Kotala
Date:
Peter Eisentraut píše v ne 24. 05. 2009 v 00:40 +0300:

> I think this is not the best way to do it, because it will confuse pgindent
> and editors and such.  The DATA() macros in include/catalog have this solved;
> see include/catalog/genbki.sh.

Attached variant with faked extern without ; which is what genbki.sh
uses.

    Zdenek


Attachment

Re: [PATCH] Compiler warning cleanup

From
Peter Eisentraut
Date:
On Monday 25 May 2009 17:52:07 Zdenek Kotala wrote:
> Peter Eisentraut píše v ne 24. 05. 2009 v 00:40 +0300:
> > I think this is not the best way to do it, because it will confuse
> > pgindent and editors and such.  The DATA() macros in include/catalog have
> > this solved; see include/catalog/genbki.sh.
>
> Attached variant with faked extern without ; which is what genbki.sh
> uses.

Done.