This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: On 'unused parameter' warnings



On Sun, 29 Jul 2007, Daniel Franke wrote:

> On Sunday 29 July 2007 08:49:05 Angelo Graziosi wrote:
>
> Angelo,
>
> > > 2) use -w.
> >
> > Where this option is documented ?
> >
> > I have found it only cited here:
> > http://gcc.gnu.org/onlinedocs/gfortran/Option-Summary.html#Option-Summary
>
> That's a common option, documented by gcc. The -w shouldn't be in that list.
> I'll remove it. Thanks for mentioning it :)
>
>
> > Sometimes ago the (annoying) problem of 'unused parameter' regarded also
> > G95 and the author introduced '-Wunused-parameter' to use when one want
> > those warnings.
>
> Try -Wno-unused-variable.
>
> Btw, it would help if could quote a piece of code and the exact message :)


For example:


gfortran -DCERNLIB_TYPE -Wall -fno-automatic
-I/home/Angelo/Applications/meg/include -I/usr/local/cernlib/2005/include
-O2 -c mchps.F -o mchps.gfc.o


gives 1280 warning like this:

------------------------------------------------------------------
mchps.inc:81.27:
    Included at mchps.F:337:

      INTEGER PETMAT,KAPMAT,PVTMAT,HEEMAT,HELMAT,NITMAT,VETMAT,
                          1
Warning: unused parameter 'kapmat' declared at (1)
------------------------------------------------------------------

in which the includes belong to CERNLIB libaries!



Many thanks,

  Angelo.








>
>
> Regards
> 	Daniel
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]