Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc538592

Browse files
committed
Make all Perl warnings fatal
There are a lot of Perl scripts in the tree, mostly code generationand TAP tests. Occasionally, these scripts produce warnings. Theseare probably always mistakes on the developer side (true positives).Typical examples are warnings from genbki.pl or related when you makea mess in the catalog files during development, or warnings from testswhen they massage a config file that looks different on differenthosts, or mistakes during merges (e.g., duplicate subroutinedefinitions), or just mistakes that weren't noticed because there is alot 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 parent7418767 commitc538592

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 warningsFATAL=>'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 warningsFATAL=>'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 warningsFATAL=>'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 warningsFATAL=>'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 warningsFATAL=>'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 warningsFATAL=>'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 warningsFATAL=>'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 warningsFATAL=>'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 warningsFATAL=>'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 warningsFATAL=>'all';
1313

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

‎contrib/intarray/bench/bench.pl

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

55
use strict;
6-
use warnings;
6+
use warningsFATAL=>'all';
77

88
# make sure we are in a sane environment.
99
use DBI();

‎contrib/intarray/bench/create_test.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# contrib/intarray/bench/create_test.pl
66

77
use strict;
8-
use warnings;
8+
use warningsFATAL=>'all';
99

1010
print<<EOT;
1111
create table message (

‎contrib/oid2name/t/001_basic.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 warningsFATAL=>'all';
66

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

‎contrib/pg_prewarm/t/001_basic.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 warningsFATAL=>'all';
66

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

‎contrib/seg/seg-validate.pl

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

55
use strict;
6-
use warnings;
6+
use warningsFATAL=>'all';
77

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

‎contrib/seg/sort-segments.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# this script will sort any table with the segment data type in its last column
66

77
use strict;
8-
use warnings;
8+
use warningsFATAL=>'all';
99

1010
my@rows;
1111

‎contrib/test_decoding/t/001_repl_stats.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Test replication statistics data in pg_stat_replication_slots is sane after
55
# drop replication slot and restart.
66
use strict;
7-
use warnings;
7+
use warningsFATAL=>'all';
88
use File::Pathqw(rmtree);
99
use PostgreSQL::Test::Cluster;
1010
use PostgreSQL::Test::Utils;

‎contrib/vacuumlo/t/001_basic.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 warningsFATAL=>'all';
66

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

‎doc/src/sgml/generate-errcodes-table.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright (c) 2000-2023, PostgreSQL Global Development Group
55

66
use strict;
7-
use warnings;
7+
use warningsFATAL=>'all';
88

99
print
1010
"<!-- autogenerated from src/backend/utils/errcodes.txt, do not edit -->\n";

‎doc/src/sgml/generate-keywords-table.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Copyright (c) 2019-2023, PostgreSQL Global Development Group
66

77
use strict;
8-
use warnings;
8+
use warningsFATAL=>'all';
99

1010
my@sql_versions =reversesort ('1992','2016','2023');
1111

‎doc/src/sgml/generate-targets-meson.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright (c) 2000-2023, PostgreSQL Global Development Group
55

66
use strict;
7-
use warnings;
7+
use warningsFATAL=>'all';
88

99
my$targets_meson_file =$ARGV[0];
1010
openmy$targets_meson,'<',$targets_meson_fileordie;

‎doc/src/sgml/mk_feature_tables.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# doc/src/sgml/mk_feature_tables.pl
44

55
use strict;
6-
use warnings;
6+
use warningsFATAL=>'all';
77

88
my$yesno =$ARGV[0];
99

‎src/backend/catalog/Catalog.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
packageCatalog;
1515

1616
use strict;
17-
use warnings;
17+
use warningsFATAL=>'all';
1818

1919
use File::Compare;
2020

‎src/backend/catalog/genbki.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#----------------------------------------------------------------------
1515

1616
use strict;
17-
use warnings;
17+
use warningsFATAL=>'all';
1818
use Getopt::Long;
1919

2020
use FindBin;

‎src/backend/nodes/gen_node_support.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#----------------------------------------------------------------------
1717

1818
use strict;
19-
use warnings;
19+
use warningsFATAL=>'all';
2020

2121
use File::Basename;
2222
use Getopt::Long;

‎src/backend/parser/check_keywords.pl

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

99
use strict;
10-
use warnings;
10+
use warningsFATAL=>'all';
1111

1212
my$gram_filename =$ARGV[0];
1313
my$kwlist_filename =$ARGV[1];

‎src/backend/snowball/snowball_create.pl

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

33
use strict;
4-
use warnings;
4+
use warningsFATAL=>'all';
55
use Getopt::Long;
66

77
my$outdir_path ='';

‎src/backend/storage/lmgr/generate-lwlocknames.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright (c) 2000-2023, PostgreSQL Global Development Group
55

66
use strict;
7-
use warnings;
7+
use warningsFATAL=>'all';
88
use Getopt::Long;
99

1010
my$output_path ='.';

‎src/backend/utils/Gen_dummy_probes.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#-------------------------------------------------------------------------
88

99
use strict;
10-
use warnings;
10+
use warningsFATAL=>'all';
1111

1212
m/^\s*probe/ ||next;
1313
s/^\s*probe ([^(]*)(.*);/$1$2/;

‎src/backend/utils/Gen_fmgrtab.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Catalog;
1818

1919
use strict;
20-
use warnings;
20+
use warningsFATAL=>'all';
2121
use Getopt::Long;
2222

2323
my$output_path ='';

‎src/backend/utils/activity/generate-wait_event_types.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#----------------------------------------------------------------------
1616

1717
use strict;
18-
use warnings;
18+
use warningsFATAL=>'all';
1919
use Getopt::Long;
2020

2121
my$output_path ='.';

‎src/backend/utils/generate-errcodes.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Copyright (c) 2000-2023, PostgreSQL Global Development Group
55

66
use strict;
7-
use warnings;
7+
use warningsFATAL=>'all';
88
use Getopt::Long;
99

1010
my$outfile ='';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# # and Unicode name (not used in this script)
2626

2727
use strict;
28-
use warnings;
28+
use warningsFATAL=>'all';
2929

3030
use convutils;
3131

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# and the "b" field is the hex byte sequence for GB18030
1515

1616
use strict;
17-
use warnings;
17+
use warningsFATAL=>'all';
1818

1919
use convutils;
2020

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# "euc-jis-2004-std.txt" (http://x0213.org)
99

1010
use strict;
11-
use warnings;
11+
use warningsFATAL=>'all';
1212

1313
use convutils;
1414

‎src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# organization's ftp site.
1313

1414
use strict;
15-
use warnings;
15+
use warningsFATAL=>'all';
1616

1717
use convutils;
1818

‎src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# # and Unicode name (not used in this script)
1818

1919
use strict;
20-
use warnings;
20+
use warningsFATAL=>'all';
2121

2222
use convutils;
2323

‎src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# # and Unicode name (not used in this script)
1919

2020
use strict;
21-
use warnings;
21+
use warningsFATAL=>'all';
2222

2323
use convutils;
2424

‎src/backend/utils/mb/Unicode/UCS_to_GB18030.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# and the "b" field is the hex byte sequence for GB18030
1515

1616
use strict;
17-
use warnings;
17+
use warningsFATAL=>'all';
1818

1919
use convutils;
2020

‎src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# # and Unicode name (not used in this script)
1717

1818
use strict;
19-
use warnings;
19+
use warningsFATAL=>'all';
2020

2121
use convutils;
2222

‎src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# "sjis-0213-2004-std.txt" (http://x0213.org)
99

1010
use strict;
11-
use warnings;
11+
use warningsFATAL=>'all';
1212

1313
use convutils;
1414

‎src/backend/utils/mb/Unicode/UCS_to_SJIS.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# ftp site.
1212

1313
use strict;
14-
use warnings;
14+
use warningsFATAL=>'all';
1515

1616
use convutils;
1717

‎src/backend/utils/mb/Unicode/UCS_to_UHC.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# and the "b" field is the hex byte sequence for UHC
1515

1616
use strict;
17-
use warnings;
17+
use warningsFATAL=>'all';
1818

1919
use convutils;
2020

‎src/backend/utils/mb/Unicode/UCS_to_most.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# # and Unicode name (not used in this script)
1717

1818
use strict;
19-
use warnings;
19+
use warningsFATAL=>'all';
2020

2121
use convutils;
2222

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp