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

Windows: Fix more warnings emitted by clang with GNU-like command-line

This commit is contained in:
reuk 2021-06-03 22:39:55 +01:00
parent cb7bda4529
commit 3399c34d0d
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
4 changed files with 22 additions and 14 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 6340 6308 6297 6001)
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 6320)
#if ! JUCE_MSVC
#define HAVE_LROUND 1
#endif

View file

@ -1023,7 +1023,7 @@ namespace AAXClasses
|| transport.GetTimelineSelectionStartPosition (&info.timeInSamples) != AAX_SUCCESS)
check (transport.GetCurrentNativeSampleLocation (&info.timeInSamples));
info.timeInSeconds = info.timeInSamples / sampleRate;
info.timeInSeconds = (float) info.timeInSamples / sampleRate;
int64_t ticks = 0;
@ -1032,13 +1032,13 @@ namespace AAXClasses
else
check (transport.GetCurrentTickPosition (&ticks));
info.ppqPosition = ticks / 960000.0;
info.ppqPosition = (double) ticks / 960000.0;
info.isLooping = false;
int64_t loopStartTick = 0, loopEndTick = 0;
check (transport.GetCurrentLoopPosition (&info.isLooping, &loopStartTick, &loopEndTick));
info.ppqLoopStart = loopStartTick / 960000.0;
info.ppqLoopEnd = loopEndTick / 960000.0;
info.ppqLoopStart = (double) loopStartTick / 960000.0;
info.ppqLoopEnd = (double) loopEndTick / 960000.0;
info.editOriginTime = 0;
info.frameRate = AudioPlayHead::fpsUnknown;

View file

@ -153,11 +153,11 @@ namespace
{
const int frameThickness = GetSystemMetrics (SM_CYFIXEDFRAME);
while (w != 0)
while (w != nullptr)
{
auto parent = getWindowParent (w);
if (parent == 0)
if (parent == nullptr)
break;
TCHAR windowType[32] = { 0 };
@ -1176,11 +1176,11 @@ public:
HWND w = (HWND) getWindowHandle();
while (w != 0)
while (w != nullptr)
{
HWND parent = getWindowParent (w);
if (parent == 0)
if (parent == nullptr)
break;
TCHAR windowType [32] = { 0 };
@ -1194,7 +1194,7 @@ public:
GetWindowRect (parent, &parentPos);
if (w != (HWND) getWindowHandle())
SetWindowPos (w, 0, 0, 0, newWidth + dw, newHeight + dh,
SetWindowPos (w, nullptr, 0, 0, newWidth + dw, newHeight + dh,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER);
dw = (parentPos.right - parentPos.left) - (windowPos.right - windowPos.left);
@ -1206,11 +1206,11 @@ public:
break;
if (dw > 100 || dh > 100)
w = 0;
w = nullptr;
}
if (w != 0)
SetWindowPos (w, 0, 0, 0, newWidth + dw, newHeight + dh,
if (w != nullptr)
SetWindowPos (w, nullptr, 0, 0, newWidth + dw, newHeight + dh,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER);
#endif
}

View file

@ -330,8 +330,16 @@ bool SystemStats::isOperatingSystem64Bit()
#else
typedef BOOL (WINAPI* LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
const auto moduleHandle = GetModuleHandleA ("kernel32");
if (moduleHandle == nullptr)
{
jassertfalse;
return false;
}
LPFN_ISWOW64PROCESS fnIsWow64Process
= (LPFN_ISWOW64PROCESS) GetProcAddress (GetModuleHandleA ("kernel32"), "IsWow64Process");
= (LPFN_ISWOW64PROCESS) GetProcAddress (moduleHandle, "IsWow64Process");
BOOL isWow64 = FALSE;