From b86b7175cb7c5f7aad567d9b27663dd2bf646470 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Tue, 13 Feb 2018 11:27:50 +0100 Subject: [PATCH] cli:platforms: Added missing sizeof Boolean variable handling when platform file is loaded from XML. --- lib/platform.cpp | 2 ++ platforms/avr8.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/platform.cpp b/lib/platform.cpp index 7865970c2..13f58a916 100644 --- a/lib/platform.cpp +++ b/lib/platform.cpp @@ -197,6 +197,8 @@ bool cppcheck::Platform::platformFile(const char exename[], const std::string &f for (const tinyxml2::XMLElement *sz = node->FirstChildElement(); sz; sz = sz->NextSiblingElement()) { if (std::strcmp(sz->Name(), "short") == 0) sizeof_short = std::atoi(sz->GetText()); + else if (std::strcmp(sz->Name(), "bool") == 0) + sizeof_bool = std::atoi(sz->GetText()); else if (std::strcmp(sz->Name(), "int") == 0) sizeof_int = std::atoi(sz->GetText()); else if (std::strcmp(sz->Name(), "long") == 0) diff --git a/platforms/avr8.xml b/platforms/avr8.xml index 448bfd139..a5cd45e35 100644 --- a/platforms/avr8.xml +++ b/platforms/avr8.xml @@ -3,6 +3,7 @@ 8 unsigned + 1 2 2 4