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;