diff --git a/tools/conventions/analyze_gfortran_warnings.py b/tools/conventions/analyze_gfortran_warnings.py index eae09ec6e2..ab1211daac 100755 --- a/tools/conventions/analyze_gfortran_warnings.py +++ b/tools/conventions/analyze_gfortran_warnings.py @@ -31,6 +31,7 @@ ) warning_re = re.compile(r".*[Ww]arning: (.*)") +warning_re_subst = re.compile(r"'\d+'") # replace occurences of '49' with * IGNORED_WARNINGS = ( "-Wrealloc-lhs", @@ -81,6 +82,8 @@ def check_warnings(fhandle): continue # we are only looking for warnings warning = m.group(1) + warning = warning_re_subst.sub("*", warning) + if any(iw in warning for iw in IGNORED_WARNINGS): continue diff --git a/tools/conventions/conventions.supp b/tools/conventions/conventions.supp index b1aefb0334..0f32302fce 100644 --- a/tools/conventions/conventions.supp +++ b/tools/conventions/conventions.supp @@ -104,6 +104,7 @@ cp_lbfgs.F: Found WRITE statement with hardcoded unit in "subsm" cp_log_handling.F: Found WRITE statement with hardcoded unit in "cp_int_to_string" cp_log_handling.F: Found WRITE statement with hardcoded unit in "cp_logger_get_default_unit_nr" cp_parser_inpp_methods.F: Found READ with unchecked STAT in "inpp_process_directive" +cp2k.F: Integer division truncated to constant * at (1) [-Winteger-division] cube_utils.F: Found WRITE statement with hardcoded unit in "return_cube_nonortho" d3_poly.F: Found CALL RANDOM_NUMBER in procedure "poly_random" dkh_main.F: Found WRITE statement with hardcoded unit in "kintegral"