Fixed Cppcheck uninitStructMember warnings

This commit is contained in:
Daniel Marjamäki 2019-04-30 20:45:48 +02:00
parent 41cf13bb7e
commit 1d12136b59
2 changed files with 2 additions and 3 deletions

View File

@ -8,7 +8,6 @@ shadowFunction
# temporary suppressions - fix the warnings! # temporary suppressions - fix the warnings!
missingOverride missingOverride
shiftTooManyBitsSigned shiftTooManyBitsSigned
uninitStructMember
unsignedLessThanZero unsignedLessThanZero
unusedPrivateFunction unusedPrivateFunction
useStlAlgorithm useStlAlgorithm

View File

@ -189,7 +189,7 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc)
for (const tinyxml2::XMLElement *memorynode = node->FirstChildElement(); memorynode; memorynode = memorynode->NextSiblingElement()) { for (const tinyxml2::XMLElement *memorynode = node->FirstChildElement(); memorynode; memorynode = memorynode->NextSiblingElement()) {
const std::string memorynodename = memorynode->Name(); const std::string memorynodename = memorynode->Name();
if (memorynodename == "alloc") { if (memorynodename == "alloc") {
AllocFunc temp; AllocFunc temp = {0};
temp.groupId = allocationId; temp.groupId = allocationId;
if (memorynode->Attribute("init", "false")) if (memorynode->Attribute("init", "false"))
@ -227,7 +227,7 @@ Library::Error Library::load(const tinyxml2::XMLDocument &doc)
mAlloc[memorynode->GetText()] = temp; mAlloc[memorynode->GetText()] = temp;
} else if (memorynodename == "dealloc") { } else if (memorynodename == "dealloc") {
AllocFunc temp; AllocFunc temp = {0};
temp.groupId = allocationId; temp.groupId = allocationId;
const char *arg = memorynode->Attribute("arg"); const char *arg = memorynode->Attribute("arg");
if (arg) if (arg)