Re: BUG #16345: ts_headline does not find phrase matches correctly
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-04-09T19:29:49Z
Lists: pgsql-bugs, pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes: > I am getting a compiler warning, both with and without --enable-cassert. > wparser_def.c: In function 'prsd_headline': > wparser_def.c:2530:2: warning: 'pose' may be used uninitialized in this > function [-Wmaybe-uninitialized] > mark_fragment(prs, highlightall, bestb, beste); > ^ > wparser_def.c:2384:6: note: 'pose' was declared here > int pose, I see it too, now that I try a different compiler version. Will fix. > It makes no sense to me that pose could be used uninitialized on a line > that doesn't use pose at all, so maybe it is a compiler bug or something. It looks like the compiler is doing aggressive inlining, which might have something to do with the crummy error report placement. Notice that this isn't inside 'prsd_headline' at all, so far as the source code is concerned. regards, tom lane
Commits
-
Further cleanup of ts_headline code.
- c2599b93df0a 9.6.18 landed
- 9be664d715eb 10.13 landed
- d9a3fe4c56fe 11.8 landed
- 07453e9e332d 12.3 landed
- 2e0e409e3cba 13.0 landed
-
Fix default text search parser's ts_headline code for phrase queries.
- c9b0c678d30a 13.0 landed
- c81de3a8230c 9.6.18 landed
- 91be1d1906a7 11.8 landed
- 841378947722 12.3 landed
- 5f7247b3ba6b 10.13 landed
-
Cosmetic improvements for default text search parser's ts_headline code.
- ff081d6bb872 11.8 landed
- afab3998685f 10.13 landed
- 638519156ef0 9.6.18 landed
- b10f8bb9fd39 13.0 landed
- 1306edeae3b3 12.3 landed