From 42be02332b4f930a544ccb0d8abe16fe5d7e612f Mon Sep 17 00:00:00 2001
From: Evdokimov Ilia <ilya.evdokimov@tantorlabs.com>
Date: Thu, 23 Jul 2026 13:21:11 +0300
Subject: [PATCH v2 2/9] Fir warnings

---
 src/backend/optimizer/path/uniquekey.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/optimizer/path/uniquekey.c b/src/backend/optimizer/path/uniquekey.c
index 4200663b822..42ba7e7c35c 100644
--- a/src/backend/optimizer/path/uniquekey.c
+++ b/src/backend/optimizer/path/uniquekey.c
@@ -884,7 +884,7 @@ convert_unique_keys_for_rel(PlannerInfo *root, RelOptInfo *rel,
 		if (!IS_UPPER_REL(input_rel))
 		{
 			/* Conversion between base/join rels is currently not needed. */
-			IS_UPPER_REL(rel);
+			Assert(IS_UPPER_REL(rel));
 
 			/*
 			 * For each key, check its ECs and find the EM present in
@@ -942,7 +942,7 @@ convert_unique_keys_for_rel(PlannerInfo *root, RelOptInfo *rel,
 		}
 		else
 		{
-			ListCell	*lc2 = list_head(key->opfamily_lists);
+			ListCell	*opfamily_cell = list_head(key->opfamily_lists);
 
 			/* IS_UPPER_REL(input_rel) */
 
@@ -1007,12 +1007,12 @@ convert_unique_keys_for_rel(PlannerInfo *root, RelOptInfo *rel,
 					}
 					if (target_var)
 					{
-						List		*opfamilies = lfirst(lc2);
+						List		*opfamilies = lfirst(opfamily_cell);
 
 						matched = find_ec_position_matching_expr(root, rel,
 																 (Expr *) target_var,
 																 opfamilies);
-						lc2 = lnext(key->opfamily_lists, lc2);
+						opfamily_cell = lnext(key->opfamily_lists, opfamily_cell);
 					}
 					else
 						matched = -1;
-- 
2.34.1

