Skip to content

Commit

Permalink
conventions: disable integer division warning for cp2k.F
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-zero committed Dec 2, 2019
1 parent 173a7df commit bdc3ce7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/conventions/analyze_gfortran_warnings.py
Expand Up @@ -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",
Expand Down Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tools/conventions/conventions.supp
Expand Up @@ -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"
Expand Down

0 comments on commit bdc3ce7

Please sign in to comment.