8000 Use perl warnings pragma consistently · postgrespro/postgres@7be5d8d · GitHub
[go: up one dir, main page]

Skip to content

Commit 7be5d8d

Browse files
committed
Use perl warnings pragma consistently
We've had a mixture of the warnings 8000 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
1 parent 8930e43 commit 7be5d8d

35 files changed

+59
-10
lines changed

contrib/intarray/bench/bench.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/perl
22

33
use strict;
4+
use warnings;
45

56
# make sure we are in a sane environment.
67
use DBI();

contrib/intarray/bench/create_test.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# contrib/intarray/bench/create_test.pl
44

55
use strict;
6+
use warnings;
7+
68
print <<EOT;
79
create table message (
810
mid int not null,

contrib/seg/seg-validate.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/perl
22

33
use strict;
4+
use warnings;
45

56
my $integer = '[+-]?[0-9]+';
67
my $real = '[+-]?[0-9]+\.[0-9]+';

contrib/seg/sort-segments.pl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# this script will sort any table with the segment data type in its last column
44

55
use strict;
6+
use warnings;
67

78
my @rows;
89

doc/src/sgml/mk_feature_tables.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# /usr/bin/perl -w
1+
# /usr/bin/perl
22

33
# doc/src/sgml/mk_feature_tables.pl
44

55
use strict;
6+
use warnings;
67

78
my $yesno = $ARGV[0];
89

src/backend/catalog/genbki.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/perl -w
1+
#!/usr/bin/perl
22
#----------------------------------------------------------------------
33
#
44
# genbki.pl

src/backend/utils/Gen_fmgrtab.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /usr/bin/perl -w
1+
#! /usr/bin/perl
22
#-------------------------------------------------------------------------
33
#
44
# Gen_fmgrtab.pl

src/backend/utils/mb/Unicode/UCS_to_BIG5.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
# # and Unicode name (not used in this script)
2626

2727
use strict;
28+
use warnings;
29+
2830
use convutils;
2931

3032
my $this_script = 'src/backend/utils/mb/Unicode/UCS_to_BIG5.pl';

src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# and the "b" field is the hex byte sequence for GB18030
1515

1616
use strict;
17+
use warnings;
18+
1719
use convutils;
1820

1921
my $this_script = 'src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl';

src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# "euc-jis-2004-std.txt" (http://x0213.org)
99

1010
use strict;
11+
use warnings;
12+
1113
use convutils;
1214

1315
my $this_script = 'src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl';

0 commit comments

Comments
 (0)
0