Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Issues
  • #47
Closed
Open
Issue created Jan 13, 2015 by Administrator@rootContributor

virtual destructor warning

Created by: Slechtvalk

When compiling for STM32 Cortex-M4 I got this warning :-1::

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.

Assignee
Assign to
Time tracking