diff --git a/build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp b/build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp index 51e757da1b..387e65028a 100644 --- a/build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp +++ b/build/win32/platform_specific_code/juce_win32_ActiveXComponent.cpp @@ -488,7 +488,7 @@ bool ActiveXControlComponent::createControl (const void* controlIID) if (info->controlHWND != 0) { - originalWndProc = (void*) GetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC); + originalWndProc = (void*) (pointer_sized_int) GetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC); SetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC, (LONG_PTR) activeXHookWndProc); } diff --git a/build/win32/platform_specific_code/juce_win32_Windowing.cpp b/build/win32/platform_specific_code/juce_win32_Windowing.cpp index 839f071d8d..f7607ee081 100644 --- a/build/win32/platform_specific_code/juce_win32_Windowing.cpp +++ b/build/win32/platform_specific_code/juce_win32_Windowing.cpp @@ -808,7 +808,7 @@ public: static Win32ComponentPeer* getOwnerOfWindow (HWND h) throw() { if (h != 0 && GetWindowLongPtr (h, GWLP_USERDATA) == improbableWindowNumber) - return (Win32ComponentPeer*) GetWindowLongPtr (h, 8); + return (Win32ComponentPeer*) (pointer_sized_int) GetWindowLongPtr (h, 8); return 0; } diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 2aed35498c..6eec0aa946 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -23122,7 +23122,7 @@ void AudioSampleBuffer::setSize (const int newNumChannels, size = newNumSamples; if (newNumChannels > numChannels) - channels = (float**) juce_realloc (channels, newNumChannels * sizeof (float*)); + channels = (float**) juce_realloc (channels, (newNumChannels + 1) * sizeof (float*)); numChannels = newNumChannels; @@ -241397,7 +241397,7 @@ public: static Win32ComponentPeer* getOwnerOfWindow (HWND h) throw() { if (h != 0 && GetWindowLongPtr (h, GWLP_USERDATA) == improbableWindowNumber) - return (Win32ComponentPeer*) GetWindowLongPtr (h, 8); + return (Win32ComponentPeer*) (pointer_sized_int) GetWindowLongPtr (h, 8); return 0; } @@ -244832,7 +244832,7 @@ bool ActiveXControlComponent::createControl (const void* controlIID) if (info->controlHWND != 0) { - originalWndProc = (void*) GetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC); + originalWndProc = (void*) (pointer_sized_int) GetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC); SetWindowLongPtr ((HWND) info->controlHWND, GWLP_WNDPROC, (LONG_PTR) activeXHookWndProc); } diff --git a/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp b/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp index 64a26123f6..3ddea55a55 100644 --- a/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp +++ b/src/juce_appframework/audio/dsp/juce_AudioSampleBuffer.cpp @@ -223,7 +223,7 @@ void AudioSampleBuffer::setSize (const int newNumChannels, size = newNumSamples; if (newNumChannels > numChannels) - channels = (float**) juce_realloc (channels, newNumChannels * sizeof (float*)); + channels = (float**) juce_realloc (channels, (newNumChannels + 1) * sizeof (float*)); numChannels = newNumChannels;