biocro / biocro

https://biocro.github.io/
Other
41 stars 19 forks source link

Compilation warnings #94

Closed gsrohde closed 5 months ago

gsrohde commented 5 months ago

Here are some warnings I get when I add the -Wall and -Wextra to the compilation command:

In file included from R_get_all_ode_solvers.cpp:6:
In file included from ./framework/ode_solver_library/ode_solver_factory.h:7:
In file included from ./framework/ode_solver_library/../ode_solver.h:5:
In file included from ../inc/boost/numeric/odeint.hpp:79:
In file included from ../inc/boost/numeric/odeint/stepper/generation.hpp:32:
../inc/boost/numeric/odeint/stepper/generation/generation_controlled_adams_bashforth_moulton.hpp:43:99: warning: unused
      parameter 'stepper' [-Wunused-parameter]
    controller_type operator()( value_type abs_error , value_type rel_error , const stepper_type &stepper )

I think we can ignore this type of error coming from Boost, and I won't list any more of them.

There are only two non–Boost-related warnings:

clang++ -mmacosx-version-min=10.13 -std=gnu++11 -MT module_library/rue_leaf_photosynthesis.o -MMD -MP -MF .deps/module_library/rue_leaf_photosynthesis.Td -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inc -DR_NO_REMAP -Wall -Wextra  -I/usr/local/include   -fPIC  -Wall -g -O2  -c -o module_library/rue_leaf_photosynthesis.o module_library/rue_leaf_photosynthesis.cpp
module_library/rue_leaf_photosynthesis.cpp:83:5: warning: missing field 'iterations' initializer
      [-Wmissing-field-initializers]
    };

I'm not sure how the iteration-related code works, but maybe this should be explicitly set to zero here. In any case, this is probably the only warning that should possibly be dealt with.

clang++ -mmacosx-version-min=10.13 -std=gnu++11 -MT module_library/c3photo.o -MMD -MP -MF .deps/module_library/c3photo.Td -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inc -DR_NO_REMAP -Wall -Wextra  -I/usr/local/include   -fPIC  -Wall -g -O2  -c -o module_library/c3photo.o module_library/c3photo.cpp
module_library/c3photo.cpp:30:18: warning: unused parameter 'AP' [-Wunused-parameter]
    double const AP,                           // Pa (TEMPORARILY UNUSED)

I guess this is a known anomaly.

justinmcgrath commented 5 months ago

Is it OK to close this, as it was fixed in #101?