Skip to content
Permalink
Browse files

conventions: disable integer division warning for cp2k.F

  • Loading branch information...
dev-zero committed Dec 2, 2019
1 parent 173a7df commit bdc3ce7919d51ea4a779c0b00feb544965059f8c
Showing with 4 additions and 0 deletions.
  1. +3 −0 tools/conventions/analyze_gfortran_warnings.py
  2. +1 −0 tools/conventions/conventions.supp
@@ -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

@@ -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"

0 comments on commit bdc3ce7

Please sign in to comment.
You can’t perform that action at this time.