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

Fix warnings from -Wsuggest-override #827

Merged

Conversation

PhilMiller
Copy link
Contributor

@PhilMiller PhilMiller commented May 30, 2024

We want to be able to build the code as strictly as possible without compiler warnings. This fixes warnings from -Wsuggest-override, which indicates the potential for hidden mistakes relating to dynamic method dispatch, and hence incorrect results.

Changes

  • Add override on various member function declarations throughout the code and tests
  • Update Sloth with Add omitted 'override' on BMI methods SLoTH#6
  • Add -Wsuggest-override to CI build with -Werror so new instances aren't introduced

Testing

  1. CI passes with no instances of the offending warning

Notes

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

@PhilMiller PhilMiller marked this pull request as ready for review June 3, 2024 05:37
@hellkite500 hellkite500 merged commit 9abd2d3 into NOAA-OWP:master Jun 3, 2024
19 checks passed
@PhilMiller PhilMiller deleted the PhilMiller/Wsuggest-override branch June 3, 2024 14:39
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