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

Reduce GNU Compilation Warnings #424

Closed

Conversation

scrasmussen
Copy link
Member

This PR fixes warnings from the w3emc library warnings because they don't use generic interfaces

The w3emc module commit is just a wrapper to the normal w3emc w3difdat and w3movdat functions but uses generic interfaces in a single file. This means the type warnings only are produced once when compiling the wrapper module, rather than in every file that calls w3difdat and w3movdat. This wrapper file module can easily be removed in the future if the w3emc library decides to move to generic interfaces.

This PR almost fulfills the GNU compiler part of the requirement "Code must compile without errors or warnings. Errors and warnings may not be suppressed, and the compiler warning level ("-W" options) must be at least the default one." as pointed out in ufs-community/ufs-weather-model#1984 (comment). It also a step towards fulfulling the goal/requirement of no warnings from -Wall, as pointed out in NCAR/ccpp-physics#495.

@scrasmussen
Copy link
Member Author

This PR requires CCPP-Physics PR#1048

@scrasmussen scrasmussen changed the title Recude GNU Compilation Warnings Reduce GNU Compilation Warnings Jan 17, 2024
@grantfirl
Copy link
Collaborator

@scrasmussen There has been talk for quite a while related to eliminating the dependence on any of the NCEPlibs for the SCM and CCPP. I think that the idea was to use the code in https://github.com/NOAA-EMC/NCEPLIBS?tab=readme-ov-file, write modern interfaces that don't produce any warnings, and include the code in the CCPP physics repo. There should really only be a couple hundred lines that are needed from the W3EMC and SP libs.

@scrasmussen
Copy link
Member Author

PR #468 is a better fix to the issue that this PR fixes. Closing this PR

@scrasmussen scrasmussen closed this May 3, 2024
@scrasmussen scrasmussen deleted the compiler-warning-reduction/w3emc branch October 17, 2024 17:33
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