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
  • #909
Closed
Open
Issue created Feb 21, 2019 by Administrator@rootContributor

Maybe Unitiailized Variable Warning on gcc 8.2

Created by: furkanusta

Because of the name of the project I wasn't sure the target platform is supposed to be an Arduino but when I comment out -Werror the library builds fine and passes the tests. That is why, I've opened this issue.

I am on x86_64, Fedora 29. Using g++ 8.2

And these are the warnings I got

../test/JsonVariant/subscript.cpp: In function ‘void ____C_A_T_C_H____T_E_S_T____0()’: ../test/JsonVariant/subscript.cpp:71:17: warning: ‘var.ArduinoJson::JsonVariant::_content.ArduinoJson::Internals::JsonVariantContent::asArray’ may be used uninitialized in this function [-Wmaybe-uninitialized] JsonVariant var = _jsonBuffer.parseArray("[{}]");

../test/JsonVariant/subscript.cpp:67:42: warning: ‘var.ArduinoJson::JsonVariant::_content.ArduinoJson::Internals::JsonVariantContent::asArray’ may be used uninitialized in this function [-Wmaybe-uninitialized] REQUIRE(std::string("world") == var[0]);

../test/JsonVariant/subscript.cpp:19:55: warning: ‘var.ArduinoJson::JsonVariant::_content.ArduinoJson::Internals::JsonVariantContent::asArray’ may be used uninitialized in this function [-Wmaybe-uninitialized] REQUIRE(std::string("element at index 0") == var[0]);

Assignee
Assign to
Time tracking