diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2019-03-17 10:10:21 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2019-03-17 10:12:06 +0300 |
commit | 042162d6281a7daf1291931ee7b0a5641d3a73d7 (patch) | |
tree | 86a8158801d61366e5786b00adc583453c22e09e /src/backend/utils/adt/jsonpath_exec.c | |
parent | 0176eb210e445e8a911c7df79997c7ab62e86dcc (diff) | |
download | postgresql-042162d6281a7daf1291931ee7b0a5641d3a73d7.tar.gz postgresql-042162d6281a7daf1291931ee7b0a5641d3a73d7.zip |
Fix compiler warning in jsonpath_exec.c
Warning was observed in gcc 4.4.6, gcc 4.4.7 and probably others.
Reported-by: Tom Lane
Discussion: https://postgr.es/m/25151.1552751426%40sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils/adt/jsonpath_exec.c')
-rw-r--r-- | src/backend/utils/adt/jsonpath_exec.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c index 4fc441f11e7..c07225749e5 100644 --- a/src/backend/utils/adt/jsonpath_exec.c +++ b/src/backend/utils/adt/jsonpath_exec.c @@ -1459,15 +1459,11 @@ executePredicate(JsonPathExecContext *cxt, JsonPathItem *pred, JsonbValue *rval; bool first = true; + JsonValueListInitIterator(&rseq, &rseqit); if (rarg) - { - JsonValueListInitIterator(&rseq, &rseqit); rval = JsonValueListNext(&rseq, &rseqit); - } else - { rval = NULL; - } /* Loop over right arg sequence or do single pass otherwise */ while (rarg ? (rval != NULL) : first) |