From 407966b2ca1f9ed4aaf5514d10efa7f5dfc9bf14 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 29 Jun 2021 16:32:17 +0100 Subject: [PATCH] Windows: Fix warnings when building with clang in 64-bit mode --- modules/juce_core/threads/juce_CriticalSection.h | 4 ++-- modules/juce_events/native/juce_win32_Messaging.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/juce_core/threads/juce_CriticalSection.h b/modules/juce_core/threads/juce_CriticalSection.h index e0ed39f0ac..caaa18554a 100644 --- a/modules/juce_core/threads/juce_CriticalSection.h +++ b/modules/juce_core/threads/juce_CriticalSection.h @@ -106,9 +106,9 @@ private: // a block of memory here that's big enough to be used internally as a windows // CRITICAL_SECTION structure. #if JUCE_64BIT - std::aligned_storage<44, 4>::type lock; + std::aligned_storage<44, 8>::type lock; #else - std::aligned_storage<24, 4>::type lock; + std::aligned_storage<24, 8>::type lock; #endif #else mutable pthread_mutex_t lock; diff --git a/modules/juce_events/native/juce_win32_Messaging.cpp b/modules/juce_events/native/juce_win32_Messaging.cpp index 089df16b93..adfaf3b8c8 100644 --- a/modules/juce_events/native/juce_win32_Messaging.cpp +++ b/modules/juce_events/native/juce_win32_Messaging.cpp @@ -69,7 +69,7 @@ public: { COPYDATASTRUCT data; data.dwData = broadcastMessageMagicNumber; - data.cbData = ((size_t) localCopy.length() + 1) * sizeof (CharPointer_UTF32::CharType); + data.cbData = (DWORD) (((size_t) localCopy.length() + 1) * sizeof (CharPointer_UTF32::CharType)); data.lpData = (void*) localCopy.toUTF32().getAddress(); DWORD_PTR result;