summaryrefslogtreecommitdiffstats
path: root/bin/warnhist
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2019-12-04 02:52:55 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:20:25 (GMT)
commit1d46e823172046f259eb054370ea721eacad79b1 (patch)
tree11528139965614d2398171c275243eb55d1bd0b5 /bin/warnhist
parentfb8f955a73a41de8fa457424c4622f6dc072f53d (diff)
downloadhdf5-1d46e823172046f259eb054370ea721eacad79b1.zip
hdf5-1d46e823172046f259eb054370ea721eacad79b1.tar.gz
hdf5-1d46e823172046f259eb054370ea721eacad79b1.tar.bz2
fix intel compile warnings
Diffstat (limited to 'bin/warnhist')
-rwxr-xr-xbin/warnhist19
1 files changed, 15 insertions, 4 deletions
diff --git a/bin/warnhist b/bin/warnhist
index a8dcd97..a88474b 100755
--- a/bin/warnhist
+++ b/bin/warnhist
@@ -206,8 +206,13 @@ while (<>) {
($last_c_name, $toss) = split /\:/, $_;
}
+ # Retain C/C++ compile line, which comes with the line of warning
+ 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:/;
@@ -257,11 +262,16 @@ 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";
+ # Check for Intel icc warning
+ } 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)
@@ -331,6 +341,7 @@ while (<>) {
# Convert all quotes to '
$warning =~ s/‘/'/g;
$warning =~ s/’/'/g;
+ $warning =~ s/"/'/g;
#
# These skipped messages & "genericizations" may be specific to GCC