pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Use perl warnings pragma consistently
4+ messages / 4 participants
[nested] [flat]
Commits from this thread:
2020-04-13 e56d717d8a Silence Perl warning
* pgsql: Use perl warnings pragma consistently
@ 2020-04-13 16:00 Andrew Dunstan <andrew@dunslane.net>
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Dunstan @ 2020-04-13 16:00 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Use perl warnings pragma consistently
We've had a mixture of the warnings pragma, the -w switch on the shebang
line, and no warnings at all. This patch removes the -w swicth and add
the warnings pragma to all perl sources missing it. It raises the
severity of the TestingAndDebugging::RequireUseWarnings perlcritic
policy to level 5, so that we catch any future violations.
Discussion: https://postgr.es/m/20200412074245.GB623763@rfd.leadboat.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7be5d8df1f74b78620167d3abf32ee607e728919
Modified Files
--------------
contrib/intarray/bench/bench.pl | 1 +
contrib/intarray/bench/create_test.pl | 2 ++
contrib/seg/seg-validate.pl | 1 +
contrib/seg/sort-segments.pl | 1 +
doc/src/sgml/mk_feature_tables.pl | 3 ++-
src/backend/catalog/genbki.pl | 2 +-
src/backend/utils/Gen_fmgrtab.pl | 2 +-
src/backend/utils/mb/Unicode/UCS_to_BIG5.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_GB18030.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_SJIS.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_UHC.pl | 2 ++
src/backend/utils/mb/Unicode/UCS_to_most.pl | 2 ++
src/backend/utils/mb/Unicode/convutils.pm | 1 +
src/backend/utils/sort/gen_qsort_tuple.pl | 3 ++-
src/bin/psql/create_help.pl | 3 ++-
src/interfaces/libpq/test/regress.pl | 3 ++-
src/pl/plperl/plc_perlboot.pl | 1 +
src/pl/plperl/plperl_opmask.pl | 2 +-
src/test/locale/sort-test.pl | 1 +
src/test/perl/SimpleTee.pm | 1 +
src/tools/fix-old-flex-code.pl | 2 +-
src/tools/msvc/build.pl | 1 +
src/tools/msvc/pgbison.pl | 2 ++
src/tools/msvc/pgflex.pl | 2 ++
src/tools/msvc/vcregress.pl | 1 +
src/tools/perlcheck/perlcriticrc | 4 ++++
src/tools/pginclude/pgcheckdefines | 3 ++-
src/tools/version_stamp.pl | 3 ++-
35 files changed, 59 insertions(+), 10 deletions(-)
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Use perl warnings pragma consistently
@ 2020-04-13 21:33 Tom Lane <tgl@sss.pgh.pa.us>
parent: Andrew Dunstan <andrew@dunslane.net>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2020-04-13 21:33 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers@lists.postgresql.org
Andrew Dunstan <andrew@dunslane.net> writes:
> Use perl warnings pragma consistently
This seems to have broken something or other, as I now get a bunch of
warnings while building the docs:
...
Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 522.
Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 524.
Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 526.
Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 528.
Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 529.
...
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Use perl warnings pragma consistently
@ 2020-04-13 21:49 Alvaro Herrera <alvherre@2ndquadrant.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Alvaro Herrera @ 2020-04-13 21:49 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-committers@lists.postgresql.org
On 2020-Apr-13, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
> > Use perl warnings pragma consistently
>
> This seems to have broken something or other, as I now get a bunch of
> warnings while building the docs:
>
> ...
> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 522.
> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 524.
> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 526.
> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 528.
> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 529.
This should fix it.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachments:
defined.patch (text/x-diff, 550B) download
diff --git a/doc/src/sgml/mk_feature_tables.pl b/doc/src/sgml/mk_feature_tables.pl
index ee158cb196..a9dfebfbb3 100644
--- a/doc/src/sgml/mk_feature_tables.pl
+++ b/doc/src/sgml/mk_feature_tables.pl
@@ -54,7 +54,9 @@ while (<$feat>)
{
print " <entry>$feature_id</entry>\n";
}
- print " <entry>" . $feature_packages{$feature_id} . "</entry>\n";
+ print " <entry>",
+ defined($feature_packages{$feature_id}) ? $feature_packages{$feature_id} : "",
+ "</entry>\n";
if ($subfeature_id)
{
print " <entry>$subfeature_name</entry>\n";
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: pgsql: Use perl warnings pragma consistently
@ 2020-04-13 23:39 Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
parent: Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Dunstan @ 2020-04-13 23:39 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@2ndquadrant.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-committers@lists.postgresql.org
On 4/13/20 5:49 PM, Alvaro Herrera wrote:
> On 2020-Apr-13, Tom Lane wrote:
>
>> Andrew Dunstan <andrew@dunslane.net> writes:
>>> Use perl warnings pragma consistently
>> This seems to have broken something or other, as I now get a bunch of
>> warnings while building the docs:
>>
>> ...
>> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 522.
>> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 524.
>> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 526.
>> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 528.
>> Use of uninitialized value within %feature_packages in concatenation (.) or string at ./mk_feature_tables.pl line 57, <$feat> line 529.
Oops. Well, I guess that's why warnings are a good idea :-)
> This should fix it.
>
Right.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-04-13 23:39 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-13 16:00 pgsql: Use perl warnings pragma consistently Andrew Dunstan <andrew@dunslane.net>
2020-04-13 21:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-04-13 21:49 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-04-13 23:39 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox