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

@ -97,7 +97,7 @@ namespace FlacNamespace
#define FLAC__NO_DLL 1
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4312 4505 4365 4005 4334 181 111)
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4312 4505 4365 4005 4334 181 111 6340 6308 6297 6001)
#if ! JUCE_MSVC
#define HAVE_LROUND 1
#endif

View file

@ -2409,6 +2409,7 @@ private:
return numBits;
}
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (6385)
int getLayer3ScaleFactors2 (int* scf, Layer3SideInfo::Info& granule, const bool iStereo) noexcept
{
static const uint8 scaleTable[3][6][4] =
@ -2460,6 +2461,7 @@ private:
return numBits;
}
JUCE_END_IGNORE_WARNINGS_MSVC
bool layer3DequantizeSample (float xr[32][18], int* scf, Layer3SideInfo::Info& granule, int sampleRate, int part2bits) noexcept
{
@ -2926,7 +2928,7 @@ private:
sum += window[12] * b0[12]; sum += window[14] * b0[14];
*out++ = sum;
b0 -= 16; window -= 32;
window += bo1 << 1;
window += (ptrdiff_t) bo1 << 1;
}
for (int j = 15; j != 0; --j, b0 -= 16, window -= 32)
@ -2976,7 +2978,11 @@ public:
bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer,
int64 startSampleInFile, int numSamples) override
{
jassert (destSamples != nullptr);
if (destSamples == nullptr)
{
jassertfalse;
return false;
}
if (currentPosition != startSampleInFile)
{

View file

@ -35,7 +35,7 @@ namespace juce
namespace OggVorbisNamespace
{
#if JUCE_INCLUDE_OGGVORBIS_CODE || ! defined (JUCE_INCLUDE_OGGVORBIS_CODE)
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365 4456 4457 4459)
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4267 4127 4244 4996 4100 4701 4702 4013 4133 4206 4305 4189 4706 4995 4365 4456 4457 4459 6297 6011 6001 6308 6255 6386 6385 6246 6387 6263 6262 28182)
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wconversion",
"-Wshadow",

View file

@ -231,6 +231,7 @@ public:
for (int i = 0; i < numDestChannels; ++i)
{
JUCE_BEGIN_IGNORE_WARNINGS_MSVC (28182)
jassert (destSamples[i] != nullptr);
auto srcChan = jmin (i, (int) numChannels - 1);
@ -242,6 +243,7 @@ public:
dst[j] = ((uint32) *src) << 16;
src += numChannels;
}
JUCE_END_IGNORE_WARNINGS_MSVC
}
startSampleInFile += numToDo;
@ -260,7 +262,7 @@ private:
void checkCoInitialiseCalled()
{
CoInitialize (0);
ignoreUnused (CoInitialize (0));
}
void scanFileForDetails()