From fc904593c158cf2d6e91ddc496c2bb0dd2d8f7b4 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 17 Sep 2024 10:37:26 -0700 Subject: [PATCH] Suppress warning from CodeQL (#480) --- Src/ModelLoadCMO.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Src/ModelLoadCMO.cpp b/Src/ModelLoadCMO.cpp index 4f81fa7..36ada60 100644 --- a/Src/ModelLoadCMO.cpp +++ b/Src/ModelLoadCMO.cpp @@ -299,7 +299,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto meshName = reinterpret_cast(static_cast(meshData + usedSize)); + auto meshName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. usedSize += sizeof(wchar_t)*(*nName); if (dataSize < usedSize) @@ -328,7 +328,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto matName = reinterpret_cast(static_cast(meshData + usedSize)); + auto matName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. usedSize += sizeof(wchar_t)*(*nName); if (dataSize < usedSize) @@ -350,7 +350,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto psName = reinterpret_cast(static_cast(meshData + usedSize)); + auto psName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. usedSize += sizeof(wchar_t)*(*nName); if (dataSize < usedSize) @@ -365,7 +365,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto txtName = reinterpret_cast(static_cast(meshData + usedSize)); + auto txtName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. usedSize += sizeof(wchar_t)*(*nName); if (dataSize < usedSize) @@ -598,7 +598,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto boneName = reinterpret_cast(static_cast(meshData + usedSize)); + auto boneName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. usedSize += sizeof(wchar_t) * (*nName); if (dataSize < usedSize)