# HG changeset patch # User Sebastien Jodogne # Date 1626762748 -7200 # Node ID eb0b04c10bc46192173dd308a13b95e349bb6ec7 # Parent 1ff0751efd67db35cd7d7bf721277339751b653e cppcheck diff -r 1ff0751efd67 -r eb0b04c10bc4 Framework/Plugins/IndexUnitTests.h --- a/Framework/Plugins/IndexUnitTests.h Tue Jul 20 08:16:17 2021 +0200 +++ b/Framework/Plugins/IndexUnitTests.h Tue Jul 20 08:32:28 2021 +0200 @@ -612,15 +612,15 @@ resources.push_back(db.CreateResource(*manager, "series", OrthancPluginResourceType_Series)); resources.push_back(db.CreateResource(*manager, "instance", OrthancPluginResourceType_Instance)); - OrthancPluginAttachment a; - a.uuid = "attachment"; - a.contentType = Orthanc::FileContentType_DicomAsJson; - a.uncompressedSize = 4242; - a.uncompressedHash = "md5"; - a.compressionType = Orthanc::CompressionType_None; - a.compressedSize = 4242; - a.compressedHash = "md5"; - db.AddAttachment(*manager, resources[attachmentLevel], a, 42); + OrthancPluginAttachment d; + d.uuid = "attachment"; + d.contentType = Orthanc::FileContentType_DicomAsJson; + d.uncompressedSize = 4242; + d.uncompressedHash = "md5"; + d.compressionType = Orthanc::CompressionType_None; + d.compressedSize = 4242; + d.compressedHash = "md5"; + db.AddAttachment(*manager, resources[attachmentLevel], d, 42); db.AttachChild(*manager, resources[0], resources[1]); db.AttachChild(*manager, resources[1], resources[2]); @@ -666,23 +666,23 @@ db.AttachChild(*manager, resources[level - 1], remaining); ASSERT_EQ(6u, db.GetAllResourcesCount(*manager)); - OrthancPluginAttachment a; - a.uuid = "attachment"; - a.contentType = Orthanc::FileContentType_DicomAsJson; - a.uncompressedSize = 4242; - a.uncompressedHash = "md5"; - a.compressionType = Orthanc::CompressionType_None; - a.compressedSize = 4242; - a.compressedHash = "md5"; - db.AddAttachment(*manager, resources[attachmentLevel], a, 42); + OrthancPluginAttachment d; + d.uuid = "attachment"; + d.contentType = Orthanc::FileContentType_DicomAsJson; + d.uncompressedSize = 4242; + d.uncompressedHash = "md5"; + d.compressionType = Orthanc::CompressionType_None; + d.compressedSize = 4242; + d.compressedHash = "md5"; + db.AddAttachment(*manager, resources[attachmentLevel], d, 42); deletedAttachments.clear(); - a.uuid = "attachment2"; + d.uuid = "attachment2"; db.DeleteAttachment(*output, *manager, resources[attachmentLevel], Orthanc::FileContentType_DicomAsJson); ASSERT_EQ(1u, deletedAttachments.size()); ASSERT_EQ("attachment", *deletedAttachments.begin()); - db.AddAttachment(*manager, resources[attachmentLevel], a, 43); + db.AddAttachment(*manager, resources[attachmentLevel], d, 43); deletedAttachments.clear(); deletedResources.clear(); diff -r 1ff0751efd67 -r eb0b04c10bc4 MySQL/Plugins/MySQLIndex.cpp --- a/MySQL/Plugins/MySQLIndex.cpp Tue Jul 20 08:16:17 2021 +0200 +++ b/MySQL/Plugins/MySQLIndex.cpp Tue Jul 20 08:32:28 2021 +0200 @@ -368,7 +368,7 @@ while (!done) { bool hasSibling = false; - int64_t parentId; + int64_t parentId = -1; // Dummy initialization { DatabaseManager::CachedStatement lookupSiblings(