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

-Wdelete-non-virtual-dtor compiler warnings #492

Open
zfields opened this issue Jul 18, 2024 · 0 comments
Open

-Wdelete-non-virtual-dtor compiler warnings #492

zfields opened this issue Jul 18, 2024 · 0 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@zfields
Copy link
Contributor

zfields commented Jul 18, 2024

Running this Arduino CLI command from the folder of a sketch that #includes the "ArduinoIoTCloud" library:

arduino-cli compile --verbose --warnings=all --build-property "build.extra_flags=-Wno-unused-variable -Wno-implicit-fallthrough -Wno-psabi -Wno-deprecated-copy -Wno-missing-field-initializers -Wno-vla -Wno-sign-compare -Og -g" --fqbn arduino:mbed_opta:opta

results in this compiler warning:

~/Development/Arduino/libraries/ArduinoIoTCloud/src/ota/interface/OTAInterfaceDefault.cpp: In member function 'virtual OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch()':
~/Development/Arduino/libraries/ArduinoIoTCloud/src/ota/interface/OTAInterfaceDefault.cpp:150:12: warning: deleting object of polymorphic class type 'HttpClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
     delete http_client;
            ^~~~~~~~~~~
______________________________________________

~/Development/Arduino/libraries/ArduinoIoTCloud/src/ota/interface/OTAInterfaceDefault.cpp: In member function 'virtual void OTADefaultCloudProcessInterface::reset()':
~/Development/Arduino/libraries/ArduinoIoTCloud/src/ota/interface/OTAInterfaceDefault.cpp:226:12: warning: deleting object of polymorphic class type 'HttpClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
     delete http_client;
            ^~~~~~~~~~~
@zfields zfields changed the title non-virtual destructor compiler warnings -Wdelete-non-virtual-dtor compiler warnings Jul 18, 2024
@arduino-libraries arduino-libraries deleted a comment from zfields Jul 19, 2024
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants