summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-09 13:30:19 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-09 13:30:19 -0700
commit177a05d0ce75eeee49a98944b9c7e7efa971a0a6 (patch)
tree041859be3209522e20fc7a9164a36048e42e5d88 /macros
parent2503cc09a2f749669609e5c2b3a744426720acd1 (diff)
downloadnasm-177a05d0ce75eeee49a98944b9c7e7efa971a0a6.tar.gz
perl files: clean up warnings
Clean up some perl warnings, some of which were legitimate (apparently undef doesn't actually take a list of arguments, a common enough mistake that it is mentioned in the man page!, and a list of variables after "my" can be cantankerous), and some of which were nuisance but were easy enough to clean up. Maybe this can resolve the problems with very old version of Perl? Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'macros')
-rwxr-xr-xmacros/macros.pl11
1 files changed, 4 insertions, 7 deletions
diff --git a/macros/macros.pl b/macros/macros.pl
index d4bfa9fa..2f5d40d1 100755
--- a/macros/macros.pl
+++ b/macros/macros.pl
@@ -51,7 +51,7 @@ my $tasm_count = 0;
#
sub charcify(@) {
my $l = '';
- my $c, $o;
+ my ($c, $o);
my $space = 1;
my $quote = 0;
@@ -109,6 +109,7 @@ my @pkg_list = ();
my %pkg_number = ();
my $pkg;
my @out_list = ();
+my @std_list = ();
my $outfmt;
my $lastname;
my $z;
@@ -145,8 +146,6 @@ foreach $args ( @ARGV ) {
print OUT "\nconst unsigned char ${name}[] = {\n";
print OUT " /* From $fname */\n";
$lastname = $fname;
- push(@out_list, $out_alias[0]);
- $out_index{$out_alias[0]} = $index;
} elsif (m/^STD:\s*(.*\S)\s*$/) {
undef $pkg;
my @out_alias = split(/\s+/, $1);
@@ -161,8 +160,6 @@ foreach $args ( @ARGV ) {
print OUT "\nconst unsigned char ${name}[] = {\n";
print OUT " /* From $fname */\n";
$lastname = $fname;
- push(@std_list, $out_alias[0]);
- $std_index{$std_alias[0]} = $index;
} elsif (m/^USE:\s*(\S+)\s*$/) {
$pkg = $1;
if (defined($pkg_number{$pkg})) {
@@ -185,7 +182,7 @@ foreach $args ( @ARGV ) {
printf OUT " /* %4d */ %s0,\n", $index, charcify($z);
$index += length($z)+1;
} elsif (m/^\s*((\s*([^\"\';\s]+|\"[^\"]*\"|\'[^\']*\'))*)\s*(;.*)?$/) {
- my $s1, $s2, $pd, $ws;
+ my($s1, $s2, $pd, $ws);
if (!defined($name)) {
die "$0: $fname: macro declarations outside a known block\n";
@@ -216,7 +213,7 @@ foreach $args ( @ARGV ) {
$index += length($s2)+1;
}
} else {
- die "$fname:$line: error unterminated quote";
+ die "$fname:$line: error: unterminated quote\n";
}
}
close(INPUT);