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

From Tom Lane
Subject pgsql: Suppress -Wshadow=local warnings in REG_DEBUG code.
Date
Msg-id E1x9nF7-000000015se-1O25@gemulon.postgresql.org
Whole thread
List 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(-)


pgsql-committers by date:

Previous
From: Alexander Korotkov
Date:
Subject: pgsql: Revert "JSON_TABLE: propagate table-level ON ERROR to columns pe
Next
From: Masahiko Sawada
Date:
Subject: pgsql: Don't fully empty GIN pending list in parallel autovacuum worker