Subject: [PATCH 08/26] avoid shadow vars: res

From: Justin Pryzby <[email-masked]>
Date: Wed, 17 Aug 2022 00:22:45 -0500

backpatch to v15

commit 1a36bc9dba8eae90963a586d37b6457b32b2fed4
Author: Andrew Dunstan <[email-masked]>
Date:   Thu Mar 3 13:11:14 2022 -0500

    SQL/JSON query functions
---
 src/backend/utils/adt/jsonpath_exec.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c
index 5b6a4805721..ff1ec607eb1 100644
--- a/src/backend/utils/adt/jsonpath_exec.c
+++ b/src/backend/utils/adt/jsonpath_exec.c
@@ -3109,10 +3109,10 @@ JsonItemFromDatum(Datum val, Oid typid, int32 typmod, JsonbValue *res)
 
 				if (JsonContainerIsScalar(&jb->root))
 				{
-					bool		res PG_USED_FOR_ASSERTS_ONLY;
+					bool		tmp PG_USED_FOR_ASSERTS_ONLY;
 
-					res = JsonbExtractScalar(&jb->root, jbv);
-					Assert(res);
+					tmp = JsonbExtractScalar(&jb->root, jbv);
+					Assert(tmp);
 				}
 				else
 					JsonbInitBinary(jbv, jb);
-- 
2.17.1

--wayzTnRSUXKNfBqd
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="0009-avoid-shadow-vars-clauses.c-querytree_list.patch"