You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building MicroPython for the micro:bit v2, with CODAL at 0.2.66 and arm-none-eabi-gcc at 13.2.0, I see a lot of warnings about overloaded virtual functions in CODAL.
For example:
In file included from microbit/v2/mpcodal/lib/codal/libraries/codal-core/./inc/driver-models/Compass.h:29,
from microbit/v2/mpcodal/lib/codal/libraries/codal-core/source/driver-models/Compass.cpp:25:
microbit/v2/mpcodal/lib/codal/libraries/codal-core/./inc/core/CodalComponent.h:201:21: warning: 'virtual int codal::CodalComponent::init()' was hidden [-Woverloaded-virtual=]
201 | virtual int init() { return DEVICE_NOT_SUPPORTED; }
| ^~~~
microbit/v2/mpcodal/lib/codal/libraries/codal-core/./inc/driver-models/Compass.h:300:14: note: by 'void codal::Compass::init(uint16_t)'
300 | void init(uint16_t id);
| ^~~~
The init in CodalCompenent is public and virtual, but the init in Compass is private and not virtual. That's probably not a source of any bugs, but IMO this warning should be fixed because it's not clear what behaviour is intended with this init method.
There's a similar issue with codal::TouchSensor::onSampleEvent and codal::NRF52TouchSensor::onSampleEvent.
A few hundred of these warnings go by doing a clean build (because these headers are included in many source files), and that makes it hard to spot other warnings which may indicate actual bugs.
It would be great if these warnings could be removed, ideally by adjusting the code, eg renaming the private init to something else like initInternal.
The text was updated successfully, but these errors were encountered:
When building MicroPython for the micro:bit v2, with CODAL at 0.2.66 and
arm-none-eabi-gcc
at 13.2.0, I see a lot of warnings about overloaded virtual functions in CODAL.For example:
The
init
inCodalCompenent
is public and virtual, but theinit
inCompass
is private and not virtual. That's probably not a source of any bugs, but IMO this warning should be fixed because it's not clear what behaviour is intended with thisinit
method.There's a similar issue with
codal::TouchSensor::onSampleEvent
andcodal::NRF52TouchSensor::onSampleEvent
.A few hundred of these warnings go by doing a clean build (because these headers are included in many source files), and that makes it hard to spot other warnings which may indicate actual bugs.
It would be great if these warnings could be removed, ideally by adjusting the code, eg renaming the private
init
to something else likeinitInternal
.The text was updated successfully, but these errors were encountered: