pgsql: Suppress -Wshadow=local warnings in REG_DEBUG code.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Suppress -Wshadow=local warnings in REG_DEBUG code.
Date: 2026-09-24 17:28:21
Message-ID: E1x9nF7-000000015se-1O25@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Suppress -Wshadow=local warnings in REG_DEBUG code.

Our Solaris-camp buildfarm animals (billbug, hake, pollock, so far)
are complaining about dumpcolors()'s local variables in the wake of
3ee0edb91. This is unsurprising on one level, since that code
clearly violates the new expectation; but AFAICS these animals
aren't explicitly enabling -DREG_DEBUG, so how are they reaching
the now-faulty code? Do Solaris' headers #define that?

In any case, the fix is simple enough, just narrow the
declaration scopes of this function's loop variables.
(I could have done that only to "c", but thought it best
to maintain a consistent style in this function.)

I don't see any need to back-patch this.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/92616429093e16f938aeca92e1045174835c2a8d

Modified Files
--------------
src/backend/regex/regc_color.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Masahiko Sawada 2026-09-24 17:33:09 pgsql: Don't fully empty GIN pending list in parallel autovacuum worker
Previous Message Alexander Korotkov 2026-09-24 15:48:53 Re: pgsql: JSON_TABLE: propagate table-level ON ERROR to columns per SQL st