Re: pgsql: Fix default text search parser's ts_headline code for phrase que

From: Erik Rijkers <er(at)xs4all(dot)nl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix default text search parser's ts_headline code for phrase que
Date: 2020-04-09 17:58:22
Message-ID: 7fbf31d72d4cbe03d5b4d915c58ebd9e@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2020-04-09 19:19, Tom Lane wrote:
> Fix default text search parser's ts_headline code for phrase queries.
>
> src/backend/tsearch/wparser_def.c | 173
> +++++++++++++++++++---------------
> src/test/regress/expected/tsearch.out | 43 ++++++---
> src/test/regress/sql/tsearch.sql | 11 +++
> 3 files changed, 141 insertions(+), 86 deletions(-)

Hi,

I get compiler warning/note from gcc 9.3.0 (on debian stretch):

wparser_def.c: In function ‘prsd_headline’:
wparser_def.c:2530:2: warning: ‘pose’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
2530 | mark_fragment(prs, highlightall, bestb, beste);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wparser_def.c:2384:8: note: ‘pose’ was declared here
2384 | int pose,
| ^~~~

I am not sure whether it is useful to report warnings/notes (I can see
that these are not very important).

There is quite a lot of traffic on postgres-lists already; please let me
know if it's maybe better to only report 'real' errors.

Thanks,

Erik Rijkers

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-04-09 19:11:25 pgsql: Doc: improve documentation about ts_headline() function.
Previous Message Tom Lane 2020-04-09 17:19:44 pgsql: Fix default text search parser's ts_headline code for phrase que