-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
When compiling for STM32 Cortex-M4 I got this warning 👎:
ArduinoJson/src/Internals/../../include/ArduinoJson/Internals/../JsonBuffer.hpp:21:7: error: 'class ArduinoJson::JsonBuffer' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] class JsonBuffer { ^ cc1plus: all warnings being treated as errors
I saw the comment about adding malloc() to Arduino code. This is quite true, but leaving a destructor not virtual with virtual functions is considered very sloppy programming.
😄 I propose you add #ifndef ARDUINO
around the virtual destructor. On my STM32 those 500 bytes are of no concern and I would like to get rid of the compiler warning, which translates into an error in my build.