From c5385929593dd8499cfb5d85ac322e8ee1819fd4 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 29 Dec 2023 18:01:53 +0100 Subject: 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 --- doc/src/sgml/generate-errcodes-table.pl | 2 +- doc/src/sgml/generate-keywords-table.pl | 2 +- doc/src/sgml/generate-targets-meson.pl | 2 +- doc/src/sgml/mk_feature_tables.pl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/generate-errcodes-table.pl b/doc/src/sgml/generate-errcodes-table.pl index 51f22bde958..e4df6d9ece3 100644 --- a/doc/src/sgml/generate-errcodes-table.pl +++ b/doc/src/sgml/generate-errcodes-table.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; print "\n"; diff --git a/doc/src/sgml/generate-keywords-table.pl b/doc/src/sgml/generate-keywords-table.pl index ee44edaa6c4..145d131670c 100644 --- a/doc/src/sgml/generate-keywords-table.pl +++ b/doc/src/sgml/generate-keywords-table.pl @@ -5,7 +5,7 @@ # Copyright (c) 2019-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my @sql_versions = reverse sort ('1992', '2016', '2023'); diff --git a/doc/src/sgml/generate-targets-meson.pl b/doc/src/sgml/generate-targets-meson.pl index 56a94d6ead9..2a371ef86f2 100644 --- a/doc/src/sgml/generate-targets-meson.pl +++ b/doc/src/sgml/generate-targets-meson.pl @@ -4,7 +4,7 @@ # Copyright (c) 2000-2023, PostgreSQL Global Development Group use strict; -use warnings; +use warnings FATAL => 'all'; my $targets_meson_file = $ARGV[0]; open my $targets_meson, '<', $targets_meson_file or die; diff --git a/doc/src/sgml/mk_feature_tables.pl b/doc/src/sgml/mk_feature_tables.pl index 824be729a03..69b1d3a1a73 100644 --- a/doc/src/sgml/mk_feature_tables.pl +++ b/doc/src/sgml/mk_feature_tables.pl @@ -3,7 +3,7 @@ # doc/src/sgml/mk_feature_tables.pl use strict; -use warnings; +use warnings FATAL => 'all'; my $yesno = $ARGV[0]; -- cgit v1.2.3