Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation warning #488

Open
rs028 opened this issue Mar 3, 2023 · 2 comments
Open

Compilation warning #488

rs028 opened this issue Mar 3, 2023 · 2 comments

Comments

@rs028
Copy link
Collaborator

rs028 commented Mar 3, 2023

Doesn't appear to be serious. Compilation ends with the following warning message:

gfortran-11 -o atchem2 -Jobj -Iobj src/dataStructures.f90 src/argparse.f90 src/interpolationFunctions.f90 src/configFunctions.f90 src/inputFunctions.f90 src/outputFunctions.f90 src/atmosphereFunctions.f90 src/solarFunctions.f90 src/constraintFunctions.f90 src/solverFunctions.f90 src/parameterModules.f90 src/atchem2.f90 -ffree-form -fimplicit-none -Wall -Wpedantic -fcheck=all -fPIC -O2 -Lcvode/lib -Lopenlibm-0.8.1 -Wl,-R,/usr/lib/:cvode/lib:openlibm-0.8.1 -lopenlibm -lsundials_fcvode -lsundials_cvode -lsundials_fnvecserial -lsundials_nvecserial -ldl
src/inputFunctions.f90:1081:35:

 1081 |     speciesNames = getSpeciesList()
      |                                   ^
Warning: ‘speciesnames.offset’ may be used uninitialized [-Wmaybe-uninitialized]
src/inputFunctions.f90:1077:64:

 1077 |     character(len=maxSpecLength), allocatable :: speciesNames(:), constrainedNames(:)
      |                                                                ^
note: ‘speciesnames’ declared here
src/inputFunctions.f90:1081:35:

 1081 |     speciesNames = getSpeciesList()
      |                                   ^
Warning: ‘speciesnames.dim[0].lbound’ may be used uninitialized [-Wmaybe-uninitialized]
src/inputFunctions.f90:1077:64:

 1077 |     character(len=maxSpecLength), allocatable :: speciesNames(:), constrainedNames(:)
      |                                                                ^
note: ‘speciesnames’ declared here
@rs028 rs028 moved this to Compilation and Execution Issues in Roadmap Mar 3, 2023
@rs028 rs028 added this to Roadmap Mar 3, 2023
@rs028 rs028 added this to the version 1.3 milestone Mar 3, 2023
@spco
Copy link
Collaborator

spco commented Apr 27, 2023

I don't think this is worth worrying about - we compile with a lot of warning flags, and so this I believe is spurious. The compiler just can't rule out the possibility.

@rs028
Copy link
Collaborator Author

rs028 commented Apr 28, 2023

Yeah I had a quick look at the affected code, but it seems to me you can't initialize the array there because we don't know yet its dimensions (I think!). Anyways it doesn't seem to affect anything other than being a bit annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Compilation and Execution Issues
Development

No branches or pull requests

2 participants