singleuse.pl: enable warnings, fix them

This commit is contained in:
Viktor Szakats 2025-07-11 14:58:31 +02:00
parent f47c18a1dc
commit fbca901d39
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -33,13 +33,16 @@
# --unit : built to support unit tests
#
use strict;
use warnings;
my $unittests;
if($ARGV[0] eq "--unit") {
if(@ARGV && $ARGV[0] eq "--unit") {
$unittests = "tests/unit ";
shift @ARGV;
}
my $file = $ARGV[0];
my $file = $ARGV[0] || '';
my %wl = (
'Curl_xfer_write_resp' => 'internal api',
@ -178,7 +181,6 @@ open(N, "nm $file|") ||
my %exist;
my %uses;
my $file;
while(<N>) {
my $l = $_;
chomp $l;
@ -204,7 +206,7 @@ while(<N>) {
}
close(N);
my $err;
my $err = 0;
for(sort keys %exist) {
#printf "%s is defined in %s, used by: %s\n", $_, $exist{$_}, $uses{$_};
if(!$uses{$_}) {