summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-06-24 00:35:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:44 -0500
commit9e99838d5c8c14419a5f99fe49d228d55ec4caca (patch)
tree7f9c4f739356c35458c1fc7f1e54781f98e98f01 /source4
parentbdee131f30e1bef31498b08bb648ddee35ea4892 (diff)
downloadsamba-9e99838d5c8c14419a5f99fe49d228d55ec4caca.tar.gz
samba-9e99838d5c8c14419a5f99fe49d228d55ec4caca.tar.bz2
samba-9e99838d5c8c14419a5f99fe49d228d55ec4caca.zip
r7861: Nicer output, remove some false warnings.
(This used to be commit f5587fe5671fb28bcfb7b71acec0748e0e506993)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/script/configure_check_unused.pl18
1 files changed, 10 insertions, 8 deletions
diff --git a/source4/script/configure_check_unused.pl b/source4/script/configure_check_unused.pl
index 1b33a9e6b1..1bf433aafd 100755
--- a/source4/script/configure_check_unused.pl
+++ b/source4/script/configure_check_unused.pl
@@ -62,13 +62,14 @@ sub cfile_parse($$$)
open(FI, $in) or die("Can't open $in");
my $ln = 0;
- foreach(<FI>) {
+ my $line;
+ foreach($line = <FI>) {
$ln++;
- foreach(/\#([ \t]*)include ["<]([^">]+)/g) {
+ if ($line =~ /\#([ \t]*)include ["<]([^">]+)/) {
$headers->{$2} = "$in:$ln";
}
- foreach(/([A-Za-z0-9_]+)/g) {
+ foreach($line =~ /([A-Za-z0-9_]+)/g) {
$symbols->{$1} = "$in:$ln";
}
}
@@ -100,10 +101,11 @@ foreach (keys %ac_defines) {
(keys %ac_func_checks) or warn("No function checks found in configure.in file, parse error?");
foreach (keys %ac_func_checks) {
+ my $def = "HAVE_".uc($_);
if (not defined($symbols{$_})) {
- print "$ac_func_checks{$_}: Autoconf-checked function $_ is unused\n";
- } elsif (not defined($symbols{"HAVE_".uc($_)})) {
- print "$ac_func_checks{$_}: Autoconf-define for function $_ is unused\n";
+ print "$ac_func_checks{$_}: Autoconf-checked function `$_' is unused\n";
+ } elsif (not defined($symbols{$def})) {
+ print "$ac_func_checks{$_}: Autoconf-define `$def' for function `$_' is unused\n";
}
}
@@ -113,8 +115,8 @@ foreach (keys %ac_headers) {
my $def = "HAVE_".uc($_);
$def =~ s/[\/\.]/_/g;
if (not defined($headers{$_})) {
- print "$ac_headers{$_}: Autoconf-checked header $_ is unused\n";
+ print "$ac_headers{$_}: Autoconf-checked header `$_' is unused\n";
} elsif (not defined($symbols{$def})) {
- print "$ac_headers{$_}: Autoconf-define for header $_ is unused\n";
+ print "$ac_headers{$_}: Autoconf-define `$def' for header `$_' is unused\n";
}
}