1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Windows: Fix and suppress some analysis warnings

This fixes warnings that are emitted when building with the `-analyze`
flag enabled.
This commit is contained in:
reuk 2021-04-13 22:22:26 +01:00
parent 54423f6583
commit 31a7c62baf
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
83 changed files with 476 additions and 230 deletions

View file

@ -857,8 +857,9 @@ void AudioDeviceManager::audioDeviceIOCallbackInt (const float** inputChannelDat
auto* src = testSound->getReadPointer (0, testSoundPosition);
for (int i = 0; i < numOutputChannels; ++i)
for (int j = 0; j < numSamps; ++j)
outputChannelData [i][j] += src[j];
if (auto* dst = outputChannelData [i])
for (int j = 0; j < numSamps; ++j)
dst[j] += src[j];
testSoundPosition += numSamps;

View file

@ -697,7 +697,7 @@ public:
for (const auto typecode : typecodesX1)
{
Packets p;
p.add (PacketX1 { (uint32_t) (typecode << 0x1c | (random.nextInt64() & 0xffffff)) });
p.add (PacketX1 { (uint32_t) ((int64_t) typecode << 0x1c | (random.nextInt64() & 0xffffff)) });
checkMidi2ToMidi1Conversion (p, p);
}
@ -966,8 +966,10 @@ private:
template <typename Fn>
void forEachNonSysExTestMessage (Random& random, Fn&& fn)
{
for (uint8_t firstByte = 0x80; firstByte != 0x00; ++firstByte)
for (uint16_t counter = 0x80; counter != 0x100; ++counter)
{
const auto firstByte = (uint8_t) counter;
if (firstByte == 0xf0 || firstByte == 0xf7)
continue; // sysEx is tested separately

View file

@ -211,12 +211,17 @@ namespace
{
if (dsDirectSoundCreate == nullptr)
{
HMODULE h = LoadLibraryA ("dsound.dll");
if (auto* h = LoadLibraryA ("dsound.dll"))
{
DSOUND_FUNCTION_LOAD (DirectSoundCreate)
DSOUND_FUNCTION_LOAD (DirectSoundCaptureCreate)
DSOUND_FUNCTION_LOAD (DirectSoundEnumerateW)
DSOUND_FUNCTION_LOAD (DirectSoundCaptureEnumerateW)
DSOUND_FUNCTION_LOAD (DirectSoundCreate)
DSOUND_FUNCTION_LOAD (DirectSoundCaptureCreate)
DSOUND_FUNCTION_LOAD (DirectSoundEnumerateW)
DSOUND_FUNCTION_LOAD (DirectSoundCaptureEnumerateW)
return;
}
jassertfalse;
}
}