ggciag / mandyoc

MANDYOC is a finite element code written on top of the PETSc library to simulate thermo-chemical convection of the Earth's mantle
https://ggciag.github.io/mandyoc/
BSD 3-Clause "New" or "Revised" License
27 stars 5 forks source link

Compilation warnings due to conditionally defined values #93

Open rafaelmds opened 2 years ago

rafaelmds commented 2 years ago

In some machines, the compiler warns about -Wmaybe-uninitialized variables.

This is caused by some variables whose values are conditionally defined, although a no-matching scenario is never to be expected.

So, this need some improvement to define a default value and some improvement in the series of if conditionals.

Some variables presenting this issue: