git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0176eb2)
Fix compiler warning in jsonpath_exec.c
2019年3月17日 07:10:21 +0000 (10:10 +0300)
2019年3月17日 07:12:06 +0000 (10:12 +0300)
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


diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c
index 4fc441f11e7f14472e81587a8302fdb78ac4ef5c..c07225749e5620841f6345069d413cce641c320a 100644 (file)
--- 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)
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /