[PATCH] Compiler warning cleanup

Started by Zdenek Kotalaalmost 17 years ago4 messageshackers
Jump to latest
#1Zdenek Kotala
Zdenek.Kotala@Sun.COM

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

Attachments:

warn.patchtext/x-patch; CHARSET=US-ASCII; name=warn.patchDownload+26-26
#2Peter Eisentraut
peter_e@gmx.net
In reply to: Zdenek Kotala (#1)
Re: [PATCH] Compiler warning cleanup

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.

#3Zdenek Kotala
Zdenek.Kotala@Sun.COM
In reply to: Peter Eisentraut (#2)
Re: [PATCH] Compiler warning cleanup

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

Attachments:

warn_02.patchtext/x-patch; CHARSET=US-ASCII; name=warn_02.patchDownload+8-8
#4Peter Eisentraut
peter_e@gmx.net
In reply to: Zdenek Kotala (#3)
Re: [PATCH] Compiler warning cleanup

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.