[petsc-users] Asking about warning unused variable
Ivan Luthfi
ivanluthfi5 at gmail.com
Thu Jul 11 21:11:48 CDT 2024
Hello,
I have declare a variable in my petsc code like the following:
PetscInt mg_level = 2, finest;
but i get warning. The warning is,
(line185) warning: 'variable 'finest' set but not used
[-Wunused-but-set-variable] PetscInt mg_level=2, finest;
But actually it is used in line 200 as:
(line 200) finest = mg_level - 1;
Can you help me what should I do?
--
Best regards,
Ivan Luthfi Ihwani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240712/3d0610a5/attachment-0001.html>
More information about the petsc-users
mailing list