Make all Perl warnings fatal
authorPeter Eisentraut <[email protected]>
Fri, 29 Dec 2023 17:01:53 +0000 (18:01 +0100)
committerPeter Eisentraut <[email protected]>
Fri, 29 Dec 2023 17:20:00 +0000 (18:20 +0100)
commitc5385929593dd8499cfb5d85ac322e8ee1819fd4
treedf87a0618dea5cb1d41f0cd9e1faad27320c0438
parent7418767f11d11ca4003ed3e8e96296eabb2acfe1
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
278 files changed:
config/check_modules.pl
contrib/amcheck/t/001_verify_heapam.pl
contrib/amcheck/t/002_cic.pl
contrib/amcheck/t/003_cic_2pc.pl
contrib/amcheck/t/004_verify_nbtree_unique.pl
contrib/amcheck/t/005_pitr.pl
contrib/auto_explain/t/001_auto_explain.pl
contrib/basebackup_to_shell/t/001_basic.pl
contrib/bloom/t/001_wal.pl
contrib/fuzzystrmatch/daitch_mokotoff_header.pl
contrib/intarray/bench/bench.pl
contrib/intarray/bench/create_test.pl
contrib/oid2name/t/001_basic.pl
contrib/pg_prewarm/t/001_basic.pl
contrib/seg/seg-validate.pl
contrib/seg/sort-segments.pl
contrib/test_decoding/t/001_repl_stats.pl
contrib/vacuumlo/t/001_basic.pl
doc/src/sgml/generate-errcodes-table.pl
doc/src/sgml/generate-keywords-table.pl
doc/src/sgml/generate-targets-meson.pl
doc/src/sgml/mk_feature_tables.pl
src/backend/catalog/Catalog.pm
src/backend/catalog/genbki.pl
src/backend/nodes/gen_node_support.pl
src/backend/parser/check_keywords.pl
src/backend/snowball/snowball_create.pl
src/backend/storage/lmgr/generate-lwlocknames.pl
src/backend/utils/Gen_dummy_probes.pl
src/backend/utils/Gen_fmgrtab.pl
src/backend/utils/activity/generate-wait_event_types.pl
src/backend/utils/generate-errcodes.pl
src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl
src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
src/backend/utils/mb/Unicode/UCS_to_UHC.pl
src/backend/utils/mb/Unicode/UCS_to_most.pl
src/backend/utils/mb/Unicode/convutils.pm
src/bin/initdb/t/001_initdb.pl
src/bin/pg_amcheck/t/001_basic.pl
src/bin/pg_amcheck/t/002_nonesuch.pl
src/bin/pg_amcheck/t/003_check.pl
src/bin/pg_amcheck/t/004_verify_heapam.pl
src/bin/pg_amcheck/t/005_opclass_damage.pl
src/bin/pg_archivecleanup/t/010_pg_archivecleanup.pl
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_basebackup/t/011_in_place_tablespace.pl
src/bin/pg_basebackup/t/020_pg_receivewal.pl
src/bin/pg_basebackup/t/030_pg_recvlogical.pl
src/bin/pg_checksums/t/001_basic.pl
src/bin/pg_checksums/t/002_actions.pl
src/bin/pg_combinebackup/t/001_basic.pl
src/bin/pg_combinebackup/t/002_compare_backups.pl
src/bin/pg_combinebackup/t/003_timeline.pl
src/bin/pg_combinebackup/t/004_manifest.pl
src/bin/pg_combinebackup/t/005_integrity.pl
src/bin/pg_config/t/001_pg_config.pl
src/bin/pg_controldata/t/001_pg_controldata.pl
src/bin/pg_ctl/t/001_start_stop.pl
src/bin/pg_ctl/t/002_status.pl
src/bin/pg_ctl/t/003_promote.pl
src/bin/pg_ctl/t/004_logrotate.pl
src/bin/pg_dump/t/001_basic.pl
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/pg_dump/t/003_pg_dump_with_server.pl
src/bin/pg_dump/t/004_pg_dump_parallel.pl
src/bin/pg_dump/t/005_pg_dump_filterfile.pl
src/bin/pg_dump/t/010_dump_connstr.pl
src/bin/pg_resetwal/t/001_basic.pl
src/bin/pg_resetwal/t/002_corrupted.pl
src/bin/pg_rewind/t/001_basic.pl
src/bin/pg_rewind/t/002_databases.pl
src/bin/pg_rewind/t/003_extrafiles.pl
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl
src/bin/pg_rewind/t/005_same_timeline.pl
src/bin/pg_rewind/t/006_options.pl
src/bin/pg_rewind/t/007_standby_source.pl
src/bin/pg_rewind/t/008_min_recovery_point.pl
src/bin/pg_rewind/t/009_growing_files.pl
src/bin/pg_rewind/t/RewindTest.pm
src/bin/pg_test_fsync/t/001_basic.pl
src/bin/pg_test_timing/t/001_basic.pl
src/bin/pg_upgrade/t/001_basic.pl
src/bin/pg_upgrade/t/002_pg_upgrade.pl
src/bin/pg_upgrade/t/003_logical_slots.pl
src/bin/pg_verifybackup/t/001_basic.pl
src/bin/pg_verifybackup/t/002_algorithm.pl
src/bin/pg_verifybackup/t/003_corruption.pl
src/bin/pg_verifybackup/t/004_options.pl
src/bin/pg_verifybackup/t/005_bad_manifest.pl
src/bin/pg_verifybackup/t/006_encoding.pl
src/bin/pg_verifybackup/t/007_wal.pl
src/bin/pg_verifybackup/t/008_untar.pl
src/bin/pg_verifybackup/t/009_extract.pl
src/bin/pg_verifybackup/t/010_client_untar.pl
src/bin/pg_waldump/t/001_basic.pl
src/bin/pg_waldump/t/002_save_fullpage.pl
src/bin/pgbench/t/001_pgbench_with_server.pl
src/bin/pgbench/t/002_pgbench_no_server.pl
src/bin/psql/create_help.pl
src/bin/psql/t/001_basic.pl
src/bin/psql/t/010_tab_completion.pl
src/bin/psql/t/020_cancel.pl
src/bin/scripts/t/010_clusterdb.pl
src/bin/scripts/t/011_clusterdb_all.pl
src/bin/scripts/t/020_createdb.pl
src/bin/scripts/t/040_createuser.pl
src/bin/scripts/t/050_dropdb.pl
src/bin/scripts/t/070_dropuser.pl
src/bin/scripts/t/080_pg_isready.pl
src/bin/scripts/t/090_reindexdb.pl
src/bin/scripts/t/091_reindexdb_all.pl
src/bin/scripts/t/100_vacuumdb.pl
src/bin/scripts/t/101_vacuumdb_all.pl
src/bin/scripts/t/102_vacuumdb_stages.pl
src/bin/scripts/t/200_connstr.pl
src/common/unicode/generate-norm_test_table.pl
src/common/unicode/generate-unicode_category_table.pl
src/common/unicode/generate-unicode_east_asian_fw_table.pl
src/common/unicode/generate-unicode_nonspacing_table.pl
src/common/unicode/generate-unicode_norm_table.pl
src/common/unicode/generate-unicode_normprops_table.pl
src/common/unicode/generate-unicode_version.pl
src/include/catalog/duplicate_oids
src/include/catalog/reformat_dat_file.pl
src/include/catalog/renumber_oids.pl
src/include/catalog/unused_oids
src/interfaces/ecpg/preproc/check_rules.pl
src/interfaces/ecpg/preproc/parse.pl
src/interfaces/libpq/t/001_uri.pl
src/interfaces/libpq/t/002_api.pl
src/interfaces/libpq/t/003_load_balance_host_list.pl
src/interfaces/libpq/t/004_load_balance_dns.pl
src/pl/plperl/plc_perlboot.pl
src/pl/plperl/plperl_opmask.pl
src/pl/plperl/text2macro.pl
src/pl/plpgsql/src/generate-plerrcodes.pl
src/pl/plpython/generate-spiexceptions.pl
src/pl/tcl/generate-pltclerrcodes.pl
src/test/authentication/t/001_password.pl
src/test/authentication/t/002_saslprep.pl
src/test/authentication/t/003_peer.pl
src/test/authentication/t/004_file_inclusion.pl
src/test/authentication/t/005_sspi.pl
src/test/authentication/t/006_login_trigger.pl
src/test/icu/t/010_database.pl
src/test/kerberos/t/001_auth.pl
src/test/ldap/LdapServer.pm
src/test/ldap/t/001_auth.pl
src/test/ldap/t/002_bindpasswd.pl
src/test/locale/sort-test.pl
src/test/modules/brin/t/01_workitems.pl
src/test/modules/brin/t/02_wal_consistency.pl
src/test/modules/commit_ts/t/001_base.pl
src/test/modules/commit_ts/t/002_standby.pl
src/test/modules/commit_ts/t/003_standby_2.pl
src/test/modules/commit_ts/t/004_restart.pl
src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl
src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
src/test/modules/test_custom_rmgrs/t/001_basic.pl
src/test/modules/test_misc/t/001_constraint_validation.pl
src/test/modules/test_misc/t/002_tablespace.pl
src/test/modules/test_misc/t/003_check_guc.pl
src/test/modules/test_misc/t/004_io_direct.pl
src/test/modules/test_pg_dump/t/001_base.pl
src/test/modules/worker_spi/t/001_worker_spi.pl
src/test/modules/xid_wraparound/t/001_emergency_vacuum.pl
src/test/modules/xid_wraparound/t/002_limits.pl
src/test/modules/xid_wraparound/t/003_wraparounds.pl
src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
src/test/perl/PostgreSQL/Test/Cluster.pm
src/test/perl/PostgreSQL/Test/RecursiveCopy.pm
src/test/perl/PostgreSQL/Test/SimpleTee.pm
src/test/perl/PostgreSQL/Test/Utils.pm
src/test/perl/PostgreSQL/Version.pm
src/test/perl/README
src/test/recovery/t/001_stream_rep.pl
src/test/recovery/t/002_archiving.pl
src/test/recovery/t/003_recovery_targets.pl
src/test/recovery/t/004_timeline_switch.pl
src/test/recovery/t/005_replay_delay.pl
src/test/recovery/t/006_logical_decoding.pl
src/test/recovery/t/007_sync_rep.pl
src/test/recovery/t/008_fsm_truncation.pl
src/test/recovery/t/009_twophase.pl
src/test/recovery/t/010_logical_decoding_timelines.pl
src/test/recovery/t/012_subtransactions.pl
src/test/recovery/t/013_crash_restart.pl
src/test/recovery/t/014_unlogged_reinit.pl
src/test/recovery/t/015_promotion_pages.pl
src/test/recovery/t/016_min_consistency.pl
src/test/recovery/t/017_shm.pl
src/test/recovery/t/018_wal_optimize.pl
src/test/recovery/t/019_replslot_limit.pl
src/test/recovery/t/020_archive_status.pl
src/test/recovery/t/021_row_visibility.pl
src/test/recovery/t/022_crash_temp_files.pl
src/test/recovery/t/023_pitr_prepared_xact.pl
src/test/recovery/t/024_archive_recovery.pl
src/test/recovery/t/025_stuck_on_old_timeline.pl
src/test/recovery/t/026_overwrite_contrecord.pl
src/test/recovery/t/027_stream_regress.pl
src/test/recovery/t/028_pitr_timelines.pl
src/test/recovery/t/029_stats_restart.pl
src/test/recovery/t/030_stats_cleanup_replica.pl
src/test/recovery/t/031_recovery_conflict.pl
src/test/recovery/t/032_relfilenode_reuse.pl
src/test/recovery/t/033_replay_tsp_drops.pl
src/test/recovery/t/034_create_database.pl
src/test/recovery/t/035_standby_logical_decoding.pl
src/test/recovery/t/036_truncated_dropped.pl
src/test/recovery/t/037_invalid_database.pl
src/test/recovery/t/038_save_logical_slots_shutdown.pl
src/test/recovery/t/039_end_of_wal.pl
src/test/recovery/t/cp_history_files
src/test/ssl/t/001_ssltests.pl
src/test/ssl/t/002_scram.pl
src/test/ssl/t/003_sslinfo.pl
src/test/ssl/t/SSL/Backend/OpenSSL.pm
src/test/ssl/t/SSL/Server.pm
src/test/subscription/t/001_rep_changes.pl
src/test/subscription/t/002_types.pl
src/test/subscription/t/003_constraints.pl
src/test/subscription/t/004_sync.pl
src/test/subscription/t/005_encoding.pl
src/test/subscription/t/006_rewrite.pl
src/test/subscription/t/007_ddl.pl
src/test/subscription/t/008_diff_schema.pl
src/test/subscription/t/009_matviews.pl
src/test/subscription/t/010_truncate.pl
src/test/subscription/t/011_generated.pl
src/test/subscription/t/012_collation.pl
src/test/subscription/t/013_partition.pl
src/test/subscription/t/014_binary.pl
src/test/subscription/t/015_stream.pl
src/test/subscription/t/016_stream_subxact.pl
src/test/subscription/t/017_stream_ddl.pl
src/test/subscription/t/018_stream_subxact_abort.pl
src/test/subscription/t/019_stream_subxact_ddl_abort.pl
src/test/subscription/t/020_messages.pl
src/test/subscription/t/021_twophase.pl
src/test/subscription/t/022_twophase_cascade.pl
src/test/subscription/t/023_twophase_stream.pl
src/test/subscription/t/024_add_drop_pub.pl
src/test/subscription/t/025_rep_changes_for_schema.pl
src/test/subscription/t/026_stats.pl
src/test/subscription/t/027_nosuperuser.pl
src/test/subscription/t/028_row_filter.pl
src/test/subscription/t/029_on_error.pl
src/test/subscription/t/030_origin.pl
src/test/subscription/t/031_column_list.pl
src/test/subscription/t/032_subscribe_use_index.pl
src/test/subscription/t/033_run_as_table_owner.pl
src/test/subscription/t/100_bugs.pl
src/tools/PerfectHash.pm
src/tools/check_bison_recursion.pl
src/tools/ci/windows_build_config.pl
src/tools/copyright.pl
src/tools/fix-old-flex-code.pl
src/tools/gen_export.pl
src/tools/gen_keywordlist.pl
src/tools/git_changelog
src/tools/mark_pgdllimport.pl
src/tools/msvc_gendef.pl
src/tools/pg_bsd_indent/t/001_pg_bsd_indent.pl
src/tools/pginclude/pgcheckdefines
src/tools/pgindent/pgindent
src/tools/version_stamp.pl
src/tools/win32tzlist.pl