summaryrefslogtreecommitdiff
path: root/src/backend/statistics
diff options
context:
space:
mode:
authorDavid Rowley2022-10-05 08:01:41 +0000
committerDavid Rowley2022-10-05 08:01:41 +0000
commit2d0bbedda7c4fbf7092c39b0c06b56cb238e15d7 (patch)
tree5ded2ec68835504c3f10fcec732b80b7a2bc3f08 /src/backend/statistics
parent839c2520a7937b8895ff84fc8fc718dbfab5e72e (diff)
Rename shadowed local variables
In a similar effort to f01592f91, here we mostly rename shadowed local variables to remove the warnings produced when compiling with -Wshadow=compatible-local. This fixes 63 warnings and leaves just 5. Author: Justin Pryzby, David Rowley Reviewed-by: Justin Pryzby Discussion https://postgr.es/m/20220817145434.GC26426%40telsasoft.com
Diffstat (limited to 'src/backend/statistics')
-rw-r--r--src/backend/statistics/dependencies.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index bf698c1fc3f..744bc512b65 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -1692,7 +1692,6 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
{
int idx;
Node *expr;
- int k;
AttrNumber unique_attnum = InvalidAttrNumber;
AttrNumber attnum;
@@ -1740,15 +1739,15 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
expr = (Node *) list_nth(stat->exprs, idx);
/* try to find the expression in the unique list */
- for (k = 0; k < unique_exprs_cnt; k++)
+ for (int m = 0; m < unique_exprs_cnt; m++)
{
/*
* found a matching unique expression, use the attnum
* (derived from index of the unique expression)
*/
- if (equal(unique_exprs[k], expr))
+ if (equal(unique_exprs[m], expr))
{
- unique_attnum = -(k + 1) + attnum_offset;
+ unique_attnum = -(m + 1) + attnum_offset;
break;
}
}