summaryrefslogtreecommitdiffstats
path: root/bin/warnhist
diff options
context:
space:
mode:
Diffstat (limited to 'bin/warnhist')
-rwxr-xr-xbin/warnhist17
1 files changed, 4 insertions, 13 deletions
diff --git a/bin/warnhist b/bin/warnhist
index 507477d..7e56246 100755
--- a/bin/warnhist
+++ b/bin/warnhist
@@ -205,12 +205,8 @@ while (<>) {
($last_c_name, $toss) = split /\:/, $_;
}
- if($_ =~ /.*[A-Za-z0-9_]\.[chC]\(.*[0-9]\):.*#.*/) {
- $last_c_name = $_;
- }
-
# Skip lines that don't have the word "warning"
- next if $_ !~ /[Ww]arning/;
+ next if $_ !~ /[Ww]arning:/;
# Skip warnings from linker
next if $_ =~ /ld: warning:/;
@@ -260,15 +256,11 @@ while (<>) {
} elsif($_ =~ /^\".*, line [0-9]+: *[Ww]arning:.*/) {
($name, $toss, $warning, $extra, $extra2) = split /\:/, $_;
($name, $line) = split /\,/, $name;
- $name =~ s/^\"//g;
- $name =~ s/\"$//g;
- $line =~ s/^\s*line\s*//g;
+ $name =~ s/^\"//g;
+ $name =~ s/\"$//g;
+ $line =~ s/^\s*line\s*//g;
# print "name:'", $name, "'-'", $line, "'\n";
# print "warning:'", $warning, "'\n";
- } elsif($_ =~ /.*[A-Za-z0-9_]\.[chC]\(.*[0-9]\):.*#.*/) {
- ($last_c_name, $toss, $warning) = split /\:/, $last_c_name;
- ($name, $line) = split /\(/, $last_c_name;
- $line =~ s/\)//g;
} else {
# Check for 'character offset' field appended to file & line #
# (This is probably specific to GCC)
@@ -338,7 +330,6 @@ while (<>) {
# Convert all quotes to '
$warning =~ s/‘/'/g;
$warning =~ s/’/'/g;
- $warning =~ s/"/'/g;
#
# These skipped messages & "genericizations" may be specific to GCC