Fix warnings from new compilers#1291
Conversation
type of 'ptm' does not match original declaration [-Wlto-type-mismatch] 'virtual bool JSBSim::FGModel::Load(JSBSim::Element*)' was hidden [-Woverloaded-virtual=] 'virtual double JSBSim::FGEngine::GetPowerAvailable()' was hidden [-Woverloaded-virtual=] 'virtual double JSBSim::FGThruster::GetPowerRequired()' was hidden [-Woverloaded-virtual=]
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1291 +/- ##
=======================================
Coverage 24.76% 24.76%
=======================================
Files 169 169
Lines 19598 19605 +7
=======================================
+ Hits 4854 4856 +2
- Misses 14744 14749 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This isn't the full fix. WIP... |
No problem! Please take into account the comments I have made above (especially about using C++'s |
Co-authored-by: Bertrand Coconnier <bcoconni@users.noreply.github.com>
warning: cast between incompatible pointer to member types from 'const JSBSim::FGColumnVector3& (JSBSim::FGAccelerations::*)() const' to 'PMF' {aka 'double (JSBSim::FGAccelerations::*)(int) const'} [-Wcast-function-type]
bcoconni
left a comment
There was a problem hiding this comment.
While we are modifying code to fix warnings, we could take this opportunity to fix some old-fashioned code and use C++11's nullptr instead of 0.
Replace 0 with nullptr Co-authored-by: Bertrand Coconnier <bcoconni@users.noreply.github.com>
bcoconni
left a comment
There was a problem hiding this comment.
Looks good to me.
What about you @seanmcleod70 ?
|
Yep, looks good to merge. |
|
PR merged. Thanks for your contribution. |
Latest compilers uncovered some warnings, mostly regarding mismatched virtual function signatures.
Found using
gcc-15.1.0 -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-parameter -Wno-unused-but-set-variable -Wno-unused-label -Wno-misleading-indentation -Wno-parentheses -Wno-implicit-fallthrough#834