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

Add -Wextra -Wno-compare-reals gfortran flags #306

Merged

Conversation

mnlevy1981
Copy link
Collaborator

-Wall does not actually turn on ALL warnings, so we include -Wextra as well.
However, -Wextra flags checking for equality between two reals with the warning

Equality comparison for REAL(8) at (1)

And we want to allow those checks, so we also include -Wno-compare-reals.

These extra checks picked up on a few unused parameters (mostly subname being
declared in a subroutine and then never used)

-Wall does not actually turn on ALL warnings, so we include -Wextra as well.
However, -Wextra flags checking for equality between two reals with the warning

Equality comparison for REAL(8) at (1)

And we want to allow those checks, so we also include -Wno-compare-reals.

These extra checks picked up on a few unused parameters (mostly "subname" being
declared in a subroutine and then never used)
@klindsay28
Copy link
Collaborator

With the removal of these unused local variables, subroutines marbl_diagnostics_set_surface_forcing and store_diagnostics_ciso_surface_forcing now appear to have comments identifying local variables, but do not have local variables. I suggest removing these comment blocks.

Skimming through the code, I do not see any additional superfluous local variables comment blocks.

@mnlevy1981
Copy link
Collaborator Author

@klindsay28 -- thanks for pointing out those unnecessary code blocks, I cleaned them up (as well as a few other misplaced comments). I think the changes here are still pretty small and it's not worth finding a time to sit together and go over them, but if you get a chance could you look over the changes from 1603831 and let me know if anything else stands out as missing? I've run tests on hobart and am currently also testing on cheyenne, though I'm pretty confident these won't change answers.

@mnlevy1981 mnlevy1981 merged commit 1603831 into marbl-ecosys:development Jul 30, 2018
@mnlevy1981 mnlevy1981 deleted the enhancement/extra_gnu_warnings branch July 30, 2018 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants