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 missing override specifiers to quiet warnings #779

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

PhilMiller
Copy link
Contributor

@PhilMiller PhilMiller commented Mar 28, 2024

CI builds using Clang produce warnings like

[ 44%] Building CXX object src/bmi/CMakeFiles/ngen_bmi.dir/Bmi_Cpp_Adapter.cpp.o
In file included from /Users/runner/work/ngen/ngen/src/bmi/Bmi_Cpp_Adapter.cpp:1:
/Users/runner/work/ngen/ngen/include/bmi/Bmi_Cpp_Adapter.hpp:296:18: warning: 'is_model_initialized' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
            bool is_model_initialized();
                 ^
/Users/runner/work/ngen/ngen/include/bmi/Bmi_Adapter.hpp:35:26: note: overridden virtual function is here
            virtual bool is_model_initialized() = 0;
                         ^
1 warning generated.

They're not wrong.

Changes

  • Add the missing specifiers

Testing

  1. Compilation with AppleClang no longer emits warnings

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 ➡️

Target Environment support

  • Linux/gcc
  • macOS/AppleClang
  • Linux/clang

@PhilMiller PhilMiller merged commit 35e195b into NOAA-OWP:master Mar 28, 2024
19 checks passed
@PhilMiller PhilMiller deleted the PhilMiller/overrides branch March 28, 2024 19:14
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