pgsql: pg_upgrade: Avoid shadowing global var in function

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_upgrade: Avoid shadowing global var in function
Date: 2023-08-23 07:48:53
Message-ID: E1qYibl-000Rku-4G@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_upgrade: Avoid shadowing global var in function

The new_cluster parameter in check_for_new_tablespace_dir was
shadowing the globally defined new_cluster variable, causing
compiler warnings when running with -Wshadow. The function is
only applicable to the new cluster, so remove the parameter
rather than rename to match check_new_cluster_is_empty which
also only applies to the new cluster.

Author: Peter Smith <peter(dot)b(dot)smith(at)fujitsu(dot)com>
Discussion: https://postgr.es/m/CAHut+PvS_PHLntWy1yTgXv0O1tWm4iVcKBQFzpoQRDsm2Ce_Fg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d0e408313536d4d4a0fb4516f2596adbe06a0e60

Modified Files
--------------
src/bin/pg_upgrade/check.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2023-08-23 08:27:25 pgsql: Fix wording in comment
Previous Message Peter Eisentraut 2023-08-23 06:27:22 pgsql: doc: Improve ICU external link