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
  • #1574
Closed
Open
Issue created May 27, 2021 by Administrator@rootContributor

Fix clang-tidy errors

Created by: armandas

We are using clang-tidy for static analysis and we get the following error

error: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign,-warnings-as-errors]
    _flags &= KEY_IS_OWNED;
           ^

in this function:

  void setType(uint8_t t) {
    _flags &= KEY_IS_OWNED;
    _flags |= t;
  }

This could be resolved by adding the SYSTEM keyword to target_include_directories, but I'm aware that GCC prior to version 9 wraps all system headers in extern "C", breaking the C++ libraries.

Maybe we could add an option to specify if the SYSTEM keyword should be added? Any other ideas?

Assignee
Assign to
Time tracking