aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/tsrank.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-09-05 13:17:32 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-09-05 13:17:32 -0400
commita5cc4dab6d1d694f113912a2aca7012a95262f0b (patch)
tree73f084898fcefb8a93a10972721c0826fd2d6e0e /src/backend/utils/adt/tsrank.c
parent8febfd1855450f50f17419def41c2ea9bcf994d5 (diff)
downloadpostgresql-a5cc4dab6d1d694f113912a2aca7012a95262f0b.tar.gz
postgresql-a5cc4dab6d1d694f113912a2aca7012a95262f0b.zip
Yet more elimination of dead stores and useless initializations.
I'm not sure what tool Ranier was using, but the ones I contributed were found by using a newer version of scan-build than I tried before. Ranier Vilela and Tom Lane Discussion: https://postgr.es/m/CAEudQAo1+AcGppxDSg8k+zF4+Kv+eJyqzEDdbpDg58-=MQcerQ@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/tsrank.c')
-rw-r--r--src/backend/utils/adt/tsrank.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c
index c88ebfc7d41..38b413f6fff 100644
--- a/src/backend/utils/adt/tsrank.c
+++ b/src/backend/utils/adt/tsrank.c
@@ -857,8 +857,7 @@ calc_rank_cd(const float4 *arrdata, TSVector txt, TSQuery query, int method)
double Wdoc = 0.0;
double invws[lengthof(weights)];
double SumDist = 0.0,
- PrevExtPos = 0.0,
- CurExtPos = 0.0;
+ PrevExtPos = 0.0;
int NExtent = 0;
QueryRepresentation qr;
@@ -889,6 +888,7 @@ calc_rank_cd(const float4 *arrdata, TSVector txt, TSQuery query, int method)
{
double Cpos = 0.0;
double InvSum = 0.0;
+ double CurExtPos;
int nNoise;
DocRepresentation *ptr = ext.begin;