Cleaning up perl code

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Cleaning up perl code
Date: 2024-05-20 17:00:00
Message-ID: 70b340bc-244a-589d-ef8b-d8aebb707a84@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello hackers,

Please look at a bunch of unused variables and a couple of other defects
I found in the perl code, maybe you'll find them worth fixing:
contrib/amcheck/t/001_verify_heapam.pl
$result # unused since introduction in 866e24d47
unused sub:
get_toast_for # not used since 860593ec3

contrib/amcheck/t/002_cic.pl
$result # orphaned since 7f580aa5d

src/backend/utils/activity/generate-wait_event_types.pl
$note, $note_name # unused since introduction in fa8892847

src/bin/pg_dump/t/003_pg_dump_with_server.pl
$cmd, $stdout, $stderr, $result # unused since introduction in 2f9eb3132

src/bin/pg_dump/t/005_pg_dump_filterfile.pl
$cmd, $stdout, $stderr, $result # unused since introduciton in a5cf808be

src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
$slapd, $ldap_schema_dir # unused since introduction in 419a8dd81

src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
$clearpass # orphaned since b846091fd

src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
$ostmt # unused since introduction in 47bb9db75

src/test/recovery/t/021_row_visibility.pl
$ret # unused since introduction in 7b28913bc

src/test/recovery/t/032_relfilenode_reuse.pl
$ret # unused since introduction in e2f65f425

src/test/recovery/t/035_standby_logical_decoding.pl
$stdin, $ret, $slot # unused since introduction in fcd77d532
$subscriber_stdin, $subscriber_stdout, $subscriber_stderr # unused since introduction in 376dc8205

src/test/subscription/t/024_add_drop_pub.pl
invalid reference in a comment:
tab_drop_refresh -> tab_2 # introduced with 1046a69b3
(invalid since v6-0001-...patch in the commit's thread)

src/tools/msvc_gendef.pl
@def # unused since introduction in 933b46644?

I've attached a patch with all of these changes (tested with meson build
on Windows and check-world on Linux).

Best regards,
Alexander

Attachment Content-Type Size
cleanup-perl-code.patch text/x-patch 7.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-05-20 17:01:38 Re: libpq compression (part 3)
Previous Message Jacob Champion 2024-05-20 16:49:46 Re: libpq compression (part 3)