Skip to content

Commit c538592

Browse files
committed
Make all Perl warnings fatal
There are a lot of Perl scripts in the tree, mostly code generation and TAP tests. Occasionally, these scripts produce warnings. These are probably always mistakes on the developer side (true positives). Typical examples are warnings from genbki.pl or related when you make a mess in the catalog files during development, or warnings from tests when they massage a config file that looks different on different hosts, or mistakes during merges (e.g., duplicate subroutine definitions), or just mistakes that weren't noticed because there is a lot of output in a verbose build. This changes all warnings into fatal errors, by replacing use warnings; by use warnings FATAL => 'all'; in all Perl files. Discussion: https://www.postgresql.org/message-id/flat/06f899fd-1826-05ab-42d6-adeb1fd5e200%40eisentraut.org
1 parent 7418767 commit c538592

File tree

278 files changed

+282
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+282
-280
lines changed

config/check_modules.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# but specify them anyway for documentation's sake.)
66
#
77
use strict;
8-
use warnings;
8+
use warnings FATAL => 'all';
99
use Config;
1010

1111
use IPC::Run 0.79;

contrib/amcheck/t/001_verify_heapam.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
33

44
use strict;
5-
use warnings;
5+
use warnings FATAL => 'all';
66

77
use PostgreSQL::Test::Cluster;
88
use PostgreSQL::Test::Utils;

contrib/amcheck/t/002_cic.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Test CREATE INDEX CONCURRENTLY with concurrent modifications
55
use strict;
6-
use warnings;
6+
use warnings FATAL => 'all';
77

88
use PostgreSQL::Test::Cluster;
99
use PostgreSQL::Test::Utils;

contrib/amcheck/t/003_cic_2pc.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Test CREATE INDEX CONCURRENTLY with concurrent prepared-xact modifications
55
use strict;
6-
use warnings;
6+
use warnings FATAL => 'all';
77

88
use PostgreSQL::Test::Cluster;
99
use PostgreSQL::Test::Utils;

contrib/amcheck/t/004_verify_nbtree_unique.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# presence of breaking sort order changes.
66
#
77
use strict;
8-
use warnings;
8+
use warnings FATAL => 'all';
99
use PostgreSQL::Test::Cluster;
1010
use PostgreSQL::Test::Utils;
1111
use Test::More;

contrib/amcheck/t/005_pitr.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Test integrity of intermediate states by PITR to those states
44
use strict;
5-
use warnings;
5+
use warnings FATAL => 'all';
66
use PostgreSQL::Test::Cluster;
77
use PostgreSQL::Test::Utils;
88
use Test::More;

contrib/auto_explain/t/001_auto_explain.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
33

44
use strict;
5-
use warnings;
5+
use warnings FATAL => 'all';
66

77
use PostgreSQL::Test::Cluster;
88
use PostgreSQL::Test::Utils;

contrib/basebackup_to_shell/t/001_basic.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2021-2023, PostgreSQL Global Development Group
22

33
use strict;
4-
use warnings;
4+
use warnings FATAL => 'all';
55

66
use PostgreSQL::Test::Cluster;
77
use PostgreSQL::Test::Utils;

contrib/bloom/t/001_wal.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Test generic xlog record work for bloom index replication.
55
use strict;
6-
use warnings;
6+
use warnings FATAL => 'all';
77
use PostgreSQL::Test::Cluster;
88
use PostgreSQL::Test::Utils;
99
use Test::More;

contrib/fuzzystrmatch/daitch_mokotoff_header.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010

1111
use strict;
12-
use warnings;
12+
use warnings FATAL => 'all';
1313

1414
die "Usage: $0 OUTPUT_FILE\n" if @ARGV != 1;
1515
my $output_file = $ARGV[0];

0 commit comments

Comments
 (0)