postgrespro.git / summary / log / commit / refs

commit    042162d6281a7daf1291931ee7b0a5641d3a73d7
Author:   Alexander Korotkov <akorotkov@postgresql.org>
Date:     Sun Mar 17 07:10:21 2019 +0000

    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


src/backend/utils/adt/jsonpath_exec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c index 4fc441f11e..c07225749e 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) [parent: 0176eb210e44]