mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
MinGW: Fixed some build warnings
This commit is contained in:
parent
251ba5be6e
commit
10b7aa3c16
10 changed files with 25 additions and 13 deletions
|
|
@ -15,10 +15,15 @@
|
||||||
|
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
#ifdef JUCE_MSVC
|
#if JUCE_MSVC
|
||||||
#pragma warning (disable: 4456 4457 4459)
|
#pragma warning (disable: 4456 4457 4459)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if JUCE_GCC
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
@ -2347,3 +2352,7 @@ int ov_time_seek_lap(OggVorbis_File *vf,double pos){
|
||||||
int ov_time_seek_page_lap(OggVorbis_File *vf,double pos){
|
int ov_time_seek_page_lap(OggVorbis_File *vf,double pos){
|
||||||
return _ov_d_seek_lap(vf,pos,ov_time_seek_page);
|
return _ov_d_seek_lap(vf,pos,ov_time_seek_page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if JUCE_GCC
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -225,8 +225,8 @@ public:
|
||||||
if (f1)
|
if (f1)
|
||||||
expect (false);
|
expect (false);
|
||||||
|
|
||||||
std::function<int()> f2 ([]() { return 11; });
|
std::function<int()> f2 ([]() { return 11; });
|
||||||
f2 = nullptr;
|
f2 = nullptr;
|
||||||
if (f2)
|
if (f2)
|
||||||
expect (false);
|
expect (false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,11 @@
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if ! JUCE_MINGW
|
||||||
|
#pragma intrinsic (__cpuid)
|
||||||
|
#pragma intrinsic (__rdtsc)
|
||||||
|
#endif
|
||||||
|
|
||||||
void Logger::outputDebugString (const String& text)
|
void Logger::outputDebugString (const String& text)
|
||||||
{
|
{
|
||||||
OutputDebugString ((text + "\n").toWideCharPointer());
|
OutputDebugString ((text + "\n").toWideCharPointer());
|
||||||
|
|
@ -32,8 +37,6 @@ void Logger::outputDebugString (const String& text)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#pragma intrinsic (__cpuid)
|
|
||||||
#pragma intrinsic (__rdtsc)
|
|
||||||
|
|
||||||
#if JUCE_MINGW
|
#if JUCE_MINGW
|
||||||
static void callCPUID (int result[4], uint32 type)
|
static void callCPUID (int result[4], uint32 type)
|
||||||
|
|
@ -84,7 +87,7 @@ String SystemStats::getCpuModel()
|
||||||
|
|
||||||
const int numExtIDs = info[0];
|
const int numExtIDs = info[0];
|
||||||
|
|
||||||
if (numExtIDs < 0x80000004) // if brand string is unsupported
|
if ((unsigned) numExtIDs < 0x80000004) // if brand string is unsupported
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
callCPUID (info, 0x80000002);
|
callCPUID (info, 0x80000002);
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ namespace SocketHelpers
|
||||||
#if JUCE_WINDOWS
|
#if JUCE_WINDOWS
|
||||||
ignoreUnused (portNumber, isListener, readLock);
|
ignoreUnused (portNumber, isListener, readLock);
|
||||||
|
|
||||||
if (h != SOCKET_ERROR || connected)
|
if (h != (unsigned) SOCKET_ERROR || connected)
|
||||||
closesocket (h);
|
closesocket (h);
|
||||||
|
|
||||||
// make sure any read process finishes before we delete the socket
|
// make sure any read process finishes before we delete the socket
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ private:
|
||||||
static int pad (void*, size_t, size_t) noexcept;
|
static int pad (void*, size_t, size_t) noexcept;
|
||||||
static int unpad (const void*, size_t) noexcept;
|
static int unpad (const void*, size_t) noexcept;
|
||||||
|
|
||||||
bool apply (void*, size_t, void (BlowFish::*op) (uint32&, uint32&) const noexcept) const;
|
bool apply (void*, size_t, void (BlowFish::*op) (uint32&, uint32&) const) const;
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
uint32 p[18];
|
uint32 p[18];
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ namespace ColourHelpers
|
||||||
if (h < 3.0f) return PixelARGB (alpha, x, intV, (uint8) roundToInt (v * (1.0f - (s * (1.0f - f)))));
|
if (h < 3.0f) return PixelARGB (alpha, x, intV, (uint8) roundToInt (v * (1.0f - (s * (1.0f - f)))));
|
||||||
if (h < 4.0f) return PixelARGB (alpha, x, (uint8) roundToInt (v * (1.0f - s * f)), intV);
|
if (h < 4.0f) return PixelARGB (alpha, x, (uint8) roundToInt (v * (1.0f - s * f)), intV);
|
||||||
if (h < 5.0f) return PixelARGB (alpha, (uint8) roundToInt (v * (1.0f - (s * (1.0f - f)))), x, intV);
|
if (h < 5.0f) return PixelARGB (alpha, (uint8) roundToInt (v * (1.0f - (s * (1.0f - f)))), x, intV);
|
||||||
return PixelARGB (alpha, intV, x, (uint8) roundToInt (v * (1.0f - s * f)));
|
return PixelARGB (alpha, intV, x, (uint8) roundToInt (v * (1.0f - s * f)));
|
||||||
}
|
}
|
||||||
|
|
||||||
float hue, saturation, brightness;
|
float hue, saturation, brightness;
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,6 @@ class FlexBox;
|
||||||
#include "mouse/juce_DragAndDropContainer.h"
|
#include "mouse/juce_DragAndDropContainer.h"
|
||||||
#include "mouse/juce_FileDragAndDropTarget.h"
|
#include "mouse/juce_FileDragAndDropTarget.h"
|
||||||
#include "mouse/juce_SelectedItemSet.h"
|
#include "mouse/juce_SelectedItemSet.h"
|
||||||
#include "mouse/juce_LassoComponent.h"
|
|
||||||
#include "mouse/juce_MouseInactivityDetector.h"
|
#include "mouse/juce_MouseInactivityDetector.h"
|
||||||
#include "mouse/juce_TextDragAndDropTarget.h"
|
#include "mouse/juce_TextDragAndDropTarget.h"
|
||||||
#include "mouse/juce_TooltipClient.h"
|
#include "mouse/juce_TooltipClient.h"
|
||||||
|
|
@ -286,6 +285,7 @@ class FlexBox;
|
||||||
#include "lookandfeel/juce_LookAndFeel_V1.h"
|
#include "lookandfeel/juce_LookAndFeel_V1.h"
|
||||||
#include "lookandfeel/juce_LookAndFeel_V3.h"
|
#include "lookandfeel/juce_LookAndFeel_V3.h"
|
||||||
#include "lookandfeel/juce_LookAndFeel_V4.h"
|
#include "lookandfeel/juce_LookAndFeel_V4.h"
|
||||||
|
#include "mouse/juce_LassoComponent.h"
|
||||||
|
|
||||||
#if JUCE_LINUX
|
#if JUCE_LINUX
|
||||||
#include "native/juce_linux_X11.h"
|
#include "native/juce_linux_X11.h"
|
||||||
|
|
|
||||||
|
|
@ -788,7 +788,7 @@ struct UWPUIViewSettings
|
||||||
|
|
||||||
auto status = roInitialize (1);
|
auto status = roInitialize (1);
|
||||||
|
|
||||||
if (status != S_OK && status != S_FALSE && status != 0x80010106L)
|
if (status != S_OK && status != S_FALSE && (unsigned) status != 0x80010106L)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LPCWSTR uwpClassName = L"Windows.UI.ViewManagement.UIViewSettings";
|
LPCWSTR uwpClassName = L"Windows.UI.ViewManagement.UIViewSettings";
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
#import <AVKit/AVKit.h>
|
#import <AVKit/AVKit.h>
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
#elif JUCE_WINDOWS
|
#elif JUCE_MSVC
|
||||||
/* If you're using the camera classes, you'll need access to a few DirectShow headers.
|
/* If you're using the camera classes, you'll need access to a few DirectShow headers.
|
||||||
These files are provided in the normal Windows SDK. */
|
These files are provided in the normal Windows SDK. */
|
||||||
#include <dshow.h>
|
#include <dshow.h>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
==============================================================================
|
==============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if JUCE_MAC || JUCE_IOS || JUCE_WINDOWS || JUCE_ANDROID
|
#if JUCE_MAC || JUCE_IOS || JUCE_MSVC || JUCE_ANDROID
|
||||||
|
|
||||||
#if JUCE_MAC || JUCE_IOS
|
#if JUCE_MAC || JUCE_IOS
|
||||||
#include "../native/juce_mac_Video.h"
|
#include "../native/juce_mac_Video.h"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue