diff --git a/Audio/SoundCommon.cpp b/Audio/SoundCommon.cpp index bdd7ba3dd..b9f085efa 100644 --- a/Audio/SoundCommon.cpp +++ b/Audio/SoundCommon.cpp @@ -592,7 +592,7 @@ void DirectX::CreateADPCM( adpcm->wNumCoef = MSADPCM_NUM_COEFFICIENTS; static ADPCMCOEFSET aCoef[7] = { { 256, 0}, {512, -256}, {0,0}, {192,64}, {240,0}, {460, -208}, {392,-232} }; - memcpy(&adpcm->aCoef, aCoef, sizeof(aCoef)); // [CodeQL.SM01947]: Code scanner doesn't understand the 0-length MSVC array extension. MSADPCM_FORMAT_EXTRA_BYTES includes this memory. + memcpy(&adpcm->aCoef, aCoef, sizeof(aCoef)); // CodeQL [SM01947] Code scanner doesn't understand the 0-length MSVC array extension. MSADPCM_FORMAT_EXTRA_BYTES includes this memory. assert(IsValid(wfx)); } diff --git a/Audio/WaveBankReader.cpp b/Audio/WaveBankReader.cpp index dc5cf4f6d..eea53ad77 100644 --- a/Audio/WaveBankReader.cpp +++ b/Audio/WaveBankReader.cpp @@ -250,7 +250,7 @@ namespace fmt->wNumCoef = MSADPCM_NUM_COEFFICIENTS; static ADPCMCOEFSET aCoef[7] = { { 256, 0}, {512, -256}, {0,0}, {192,64}, {240,0}, {460, -208}, {392,-232} }; - memcpy(&fmt->aCoef, aCoef, sizeof(aCoef)); // [CodeQL.SM01947]: Code scanner doesn't understand the 0-length MSVC array extension. MSADPCM_FORMAT_EXTRA_BYTES includes this memory. + memcpy(&fmt->aCoef, aCoef, sizeof(aCoef)); // CodeQL [SM01947] Code scanner doesn't understand the 0-length MSVC array extension. MSADPCM_FORMAT_EXTRA_BYTES includes this memory. } }; diff --git a/Src/ModelLoadCMO.cpp b/Src/ModelLoadCMO.cpp index 574563070..8cbeb99eb 100644 --- a/Src/ModelLoadCMO.cpp +++ b/Src/ModelLoadCMO.cpp @@ -150,7 +150,7 @@ std::unique_ptr Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto meshName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. + auto meshName = reinterpret_cast(static_cast(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer. usedSize += sizeof(wchar_t)*(*nName); if (dataSize < usedSize) @@ -182,7 +182,7 @@ std::unique_ptr Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto matName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. + auto matName = reinterpret_cast(static_cast(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer. usedSize += sizeof(wchar_t)*(*nName); if (dataSize < usedSize) @@ -204,7 +204,7 @@ std::unique_ptr Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto psName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. + auto psName = reinterpret_cast(static_cast(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer. usedSize += sizeof(wchar_t)*(*nName); if (dataSize < usedSize) @@ -219,7 +219,7 @@ std::unique_ptr Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto txtName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. + auto txtName = reinterpret_cast(static_cast(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer. usedSize += sizeof(wchar_t)*(*nName); if (dataSize < usedSize) @@ -458,7 +458,7 @@ std::unique_ptr Model::CreateFromCMO( if (dataSize < usedSize) throw std::runtime_error("End of file"); - auto boneName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional. + auto boneName = reinterpret_cast(static_cast(meshData + usedSize)); // CodeQL [SM02986] The cast here is intentional to interpret the string in the buffer. usedSize += sizeof(wchar_t) * (*nName); if (dataSize < usedSize)