-#!/usr/bin/perl
+#!/usr/bin/perl -w
#
# headers_check.pl execute a number of trivial consistency checks
#
# 2) TODO: check for leaked CONFIG_ symbols
use strict;
-use warnings;
my ($dir, $arch, @files) = @ARGV;
my $filename;
foreach my $file (@files) {
+ local *FH;
$filename = $file;
- open(my $fh, '<', "$filename") or die "$filename: $!\n";
+ open(FH, "<$filename") or die "$filename: $!\n";
$lineno = 0;
- while ($line = <$fh>) {
+ while ($line = <FH>) {
$lineno++;
check_include();
}
- close $fh;
+ close FH;
}
exit $ret;