bogus unused module variable warnings
Anton Shterenlikht
mexas@bristol.ac.uk
Mon Feb 5 19:33:00 GMT 2018
>From mexas Mon Feb 5 12:21:29 2018
>To: fortran@gcc.gnu.org
>Subject: bogus unused module variable warning
>Reply-To: mexas@bristol.ac.uk
>
>Hi
>
>I have a module with submodules.
>A submodule uses module variables by host association.
>These variables are not used in the module file.
>Hence I get warnings like this:
>
> mpi_h3_rv ! MPI halo, dim 3, right virtual
> 1
>Warning: Unused PRIVATE module variable 'mpi_h3_rv' declared at (1) [-Wunused-value]
Actually, there's no problem - why do I need
to define parameters in a module
if they are only used in a submodule?
So I moved these parameters from the module
into the submodule.
Sorry for being so stupid.
Anton
More information about the Fortran
mailing list