summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorKimmy Mu <kmu@hdfgroup.org>2020-01-06 18:17:10 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-08 20:06:38 (GMT)
commitad80fae3cc0ece39f510612083cabacd9e059aeb (patch)
tree67053c97d6b0271dd05be115d87e9d831fbc4927 /bin
parent97c0b13af6e4471e738dd96180cf42398dc05908 (diff)
downloadhdf5-ad80fae3cc0ece39f510612083cabacd9e059aeb.zip
hdf5-ad80fae3cc0ece39f510612083cabacd9e059aeb.tar.gz
hdf5-ad80fae3cc0ece39f510612083cabacd9e059aeb.tar.bz2
Merge pull request #2071 in HDFFV/hdf5 from ~KMU/hdf5:bugfix/intel_warnings to develop
* commit '0a2bb11b248df6841daabca3970df5d8504adfc7': address problems from comments fix and address comments change according to previous comments add missing piece remove unnecessary check macro fix intel compile warnings Revert "fix warnings from Intel compiler" Revert "fix warnings and some text alignment" Revert "let hdf5 pick up the right compiler in Intel environment" Revert "fix issues from previous PR comments" Revert "using a different MACRO" using a different MACRO fix issues from previous PR comments let hdf5 pick up the right compiler in Intel environment fix warnings and some text alignment fix warnings from Intel compiler
Diffstat (limited to 'bin')
-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