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
pull/39/head
Alexander Korotkov 7 years ago
parent 0176eb210e
commit 042162d628
  1. 6
      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)

Loading…
Cancel
Save