mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-29 06:35:28 -04:00
Make analyze_gfortran_warnings.py work with C and UTF8 locales
This commit is contained in:
parent
34877e1f4b
commit
ca80fb4e41
2 changed files with 8 additions and 19 deletions
|
|
@ -29,7 +29,6 @@ lapack_re = re.compile(
|
|||
)
|
||||
|
||||
warning_re = re.compile(r".*[Ww]arning: (.*)")
|
||||
warning_re_subst = re.compile(r"‘\d+’") # replace occurrences of '49' with *
|
||||
|
||||
IGNORED_WARNINGS = (
|
||||
"-Wrealloc-lhs",
|
||||
|
|
@ -42,7 +41,7 @@ IGNORED_WARNINGS = (
|
|||
"defined but not used",
|
||||
"Removing call to function",
|
||||
"Conversion from",
|
||||
"Non-significant digits in ‘REAL(8)’",
|
||||
"Non-significant digits in 'REAL(8)'",
|
||||
"POINTER-valued function appears on right-hand side",
|
||||
"style of line directive is a GCC extension",
|
||||
)
|
||||
|
|
@ -82,15 +81,16 @@ def check_warnings(fhandle):
|
|||
continue # we are only looking for warnings
|
||||
warning = m.group(1)
|
||||
|
||||
warning = warning_re_subst.sub("*", warning)
|
||||
warning = re.sub(r"[‘’]", "'", warning) # replace unicode apostrophes
|
||||
warning = re.sub(r"'\d+'", "*", warning) # replace numbers with *
|
||||
|
||||
if any(iw in warning for iw in IGNORED_WARNINGS):
|
||||
continue
|
||||
|
||||
if "Unused" in warning:
|
||||
if "‘error’" in warning:
|
||||
if "'error'" in warning:
|
||||
continue
|
||||
if "‘routinep’" in warning:
|
||||
if "'routinep'" in warning:
|
||||
continue
|
||||
if loc_short == "cp_common_uses.f90":
|
||||
continue
|
||||
|
|
@ -102,7 +102,7 @@ def check_warnings(fhandle):
|
|||
if "called with an implicit interface" in warning:
|
||||
parts = warning.split()
|
||||
assert parts[0] == "Procedure"
|
||||
routine = parts[1].strip("‘’").upper()
|
||||
routine = parts[1].strip("'").upper()
|
||||
if may_call_implicit(loc, routine):
|
||||
continue
|
||||
print(
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ eip_silicon.F: Found WRITE statement with hardcoded unit in "eip_bazant_silicon"
|
|||
eip_silicon.F: Found WRITE statement with hardcoded unit in "eip_lenosky_silicon"
|
||||
eip_silicon.F: Found WRITE statement with hardcoded unit in "subfeniat_b"
|
||||
eip_silicon.F: Found WRITE statement with hardcoded unit in "subfeniat_l"
|
||||
eri_mme_lattice_summation.F: ‘__var_14_matmul.dim[0].lbound’ is used uninitialized in this function [-Wuninitialized]
|
||||
eri_mme_lattice_summation.F: ‘__var_14_matmul.dim[0].ubound’ is used uninitialized in this function [-Wuninitialized]
|
||||
eri_mme_lattice_summation.F: '__var_14_matmul.dim[0].lbound' is used uninitialized in this function [-Wuninitialized]
|
||||
eri_mme_lattice_summation.F: '__var_14_matmul.dim[0].ubound' is used uninitialized in this function [-Wuninitialized]
|
||||
et_coupling_proj.F: Routine INFOG2L called with an implicit interface.
|
||||
extended_system_init.F: Found WRITE statement with hardcoded unit in "init_barostat_variables"
|
||||
farming_methods.F: Found CLOSE statement in procedure "farming_parse_input"
|
||||
|
|
@ -130,17 +130,6 @@ graph_methods.F: Found WRITE statement with hardcoded unit in "fes_path"
|
|||
graph_utils.F: Found WRITE statement with hardcoded unit in "get_val_res"
|
||||
graphcon.F: Found GOTO statement in procedure "all_permutations"
|
||||
graphcon.F: Found WRITE statement with hardcoded unit in "reorder_graph"
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_0 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_1 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_2 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_3 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_4 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_5 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_6 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_7 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_8 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_9 called with an implicit interface.
|
||||
grid_integrate.F: Routine INTEGRATE_CORE_DEFAULT called with an implicit interface.
|
||||
hfx_compression_methods.F: Found READ with unchecked STAT in "hfx_decompress_cache"
|
||||
hfx_energy_potential.F: Found WRITE statement with hardcoded unit in "print_integrals"
|
||||
input_enumeration_types.F: Found WRITE statement with hardcoded unit in "enum_i2c"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue