Skip to content

Commit f9b9fa0

Browse files
authored
Suppress some spurious CodeQL warnings (#549)
1 parent 851f962 commit f9b9fa0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Audio/SoundCommon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ void DirectX::CreateADPCM(
592592
adpcm->wNumCoef = MSADPCM_NUM_COEFFICIENTS;
593593

594594
static ADPCMCOEFSET aCoef[7] = { { 256, 0}, {512, -256}, {0,0}, {192,64}, {240,0}, {460, -208}, {392,-232} };
595-
memcpy(&adpcm->aCoef, aCoef, sizeof(aCoef));
595+
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.
596596

597597
assert(IsValid(wfx));
598598
}

Audio/WaveBankReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ namespace
250250
fmt->wNumCoef = MSADPCM_NUM_COEFFICIENTS;
251251

252252
static ADPCMCOEFSET aCoef[7] = { { 256, 0}, {512, -256}, {0,0}, {192,64}, {240,0}, {460, -208}, {392,-232} };
253-
memcpy(&fmt->aCoef, aCoef, sizeof(aCoef));
253+
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.
254254
}
255255
};
256256

0 commit comments

Comments
 (0)