diff --git a/tools/conventions/analyze_gfortran_ast.py b/tools/conventions/analyze_gfortran_ast.py index 84b0b2eb4a..d61596b26b 100755 --- a/tools/conventions/analyze_gfortran_ast.py +++ b/tools/conventions/analyze_gfortran_ast.py @@ -64,9 +64,10 @@ def process_log_file(fhandle: TextIO) -> None: # Found new symbole, check default initializers of previous symbole. if cur_sym and cur_sym.startswith("__def_init_"): assert cur_derived_type + ignore = cur_derived_type in ["c_ptr", "c_funptr"] initializer = cur_value or "" is_incomplete = any(x in initializer for x in [" () ", "(() ", " ())"]) - if not initializer or is_incomplete: + if not ignore and (not initializer or is_incomplete): msg(f"Found type {cur_derived_type} without initializer", 16) # Parse new symbole. diff --git a/tools/conventions/conventions.supp b/tools/conventions/conventions.supp index 30f2445f0d..ed629b4748 100644 --- a/tools/conventions/conventions.supp +++ b/tools/conventions/conventions.supp @@ -54,6 +54,10 @@ 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" https://cp2k.org/conv#c012 eip_silicon.F: Found WRITE statement with hardcoded unit in "subfeniat_l" https://cp2k.org/conv#c012 ewald_environment_types.F: Found type ewald_environment_type without initializer https://cp2k.org/conv#c016 +ewalds_multipole.F: 'tij_a[0]' is used uninitialized [-Wuninitialized] +ewalds_multipole.F: 'tij_a[1]' is used uninitialized [-Wuninitialized] +ewalds_multipole.F: 'tij_ab[2]' is used uninitialized [-Wuninitialized] +ewalds_multipole.F: 'tij_ab[5]' is used uninitialized [-Wuninitialized] exclusion_types.F: Found type exclusion_type without initializer https://cp2k.org/conv#c016 exstates_types.F: Found type excited_energy_type without initializer https://cp2k.org/conv#c016 exstates_types.F: Found type wfn_history_type without initializer https://cp2k.org/conv#c016 @@ -337,7 +341,6 @@ qs_gcp_types.F: Found type qs_gcp_type without initializer https://cp2k.org/conv qs_grid_atom.F: Found type atom_integration_grid_type without initializer https://cp2k.org/conv#c016 qs_grid_atom.F: Found type grid_atom_type without initializer https://cp2k.org/conv#c016 qs_grid_atom.F: Found type grid_batch_type without initializer https://cp2k.org/conv#c016 -qs_gspace_mixing.F: Found WRITE statement with hardcoded unit in "broyden_mixing_new" https://cp2k.org/conv#c012 qs_harmonics_atom.F: Found type harmonics_atom_type without initializer https://cp2k.org/conv#c016 qs_initial_guess.F: Found type atom_matrix_type without initializer https://cp2k.org/conv#c016 qs_initial_guess.F: Found WRITE statement with hardcoded unit in "calculate_first_density_matrix" https://cp2k.org/conv#c012