Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ifort suppress unused variable warning, leave all others intact

i use ifort and gfortran to compile my Fortran program.

However i also use a coworkers source and he has got a lot of unused variables. How can i suppress these for the compile, seeing as they are not really an error?

However i dont want to disable -pedantic and -stan in the compiler options and thus want all the other warnings.

cheers and thanks for the help

like image 203
tarrasch Avatar asked Oct 06 '10 07:10

tarrasch


1 Answers

With ifort try -warn [no]unused.

And, while I'm here, I suggest you remove unused variables. The compiler may not regard them as an error, but disciplined software engineering regards all dead and unused code as erroneous; it imposes a maintenance burden.

like image 127
High Performance Mark Avatar answered Nov 14 '22 20:11

High Performance Mark