OBS003 block-data
warning enabled by defaultA block data program unit.
Why
block data exists only to initialise common blocks and is obsolescent since Fortran 2018. Initialise module variables in their module instead.
Reported
fortran
block data initPreferred
fortran
module state
real :: t = 0.0
end module stateSuppressing
For one occurrence, with the reason on the same line (or alone on the line before the statement):
fortran
! fobis: ignore[OBS003] <why this occurrence is fine>For the whole project, ignore = OBS003 in the fobos [lint] section.
Equivalent
Fortitude rule OB013 (see Lint Rules).