-
Notifications
You must be signed in to change notification settings - Fork 26
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
Clean up all gfortran warnings #302
Clean up all gfortran warnings #302
Conversation
GNU no longer warns about code in * marbl_interface_private_types.F90 * marbl_settings_mod.F90 * marbl_utils_mod.F90
GNU no longer warns about code in * marbl_ciso_mod.F90 * marbl_diagnostics_mod.F90
GNU no longer warns about code in * marbl_co2calc_mod.F90 * marbl_init_mod.F90 * marbl_restore_mod.F90
Makefile can now turn on -Werror
Fixed one more warning in marbl_utils_mod
Also update the Makefile to elevate warnings to errors.
Tested with more versions of gfortran. Full list:
|
There are still some warnings (labeled "Extension") about lines exceeding 132 characters that I will clean in the next commit. There are also some warnings (labeled "Questionable") about variables being set but never referenced.
marbl_mod.F90 is using autotrophs, autotroph_cnt, zooplankton, zooplankton_cnt, and max_grazer_prey_cnt at the module level, so those variables don't need to be passed through the interface of private subroutines.
Addresses #276: commits 13c2ea3 to 4fdc89f allow us to build with Testing: |
Also renamed some arguments to match what MPI calls them (e.g. receiver -> dest in marbl_mpi_send) and fixed a bug where dest was hard-coded to 0 in MPI_Send call.
Hopefully mpif90 works out-of-the-box with Travis CI, but I may need to update .travis.yml as well.
1. Add comments to variables that are initialized solely to avoid gfortran warnings 2. use c0 instead of 0 when initializing linear_root 3. initialize scale_len to c1 instead of c0 4. Align '!' instead of '&' in a block of code in marbl_ciso_mod.F90 (i.e. undo a "clean-up" from one of my previous commits)
Also elevate warnings -> errors to prevent future warnings from creeping in. Tested with gfortran 4.8.4 and 8.1.0