1
0
Fork 0
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:
tpoole 2017-07-07 11:05:41 +01:00
parent 251ba5be6e
commit 10b7aa3c16
10 changed files with 25 additions and 13 deletions

View file

@ -15,10 +15,15 @@
********************************************************************/
#ifdef JUCE_MSVC
#if JUCE_MSVC
#pragma warning (disable: 4456 4457 4459)
#endif
#if JUCE_GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
#endif
#include <stdlib.h>
#include <stdio.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){
return _ov_d_seek_lap(vf,pos,ov_time_seek_page);
}
#if JUCE_GCC
#pragma GCC diagnostic pop
#endif

View file

@ -225,8 +225,8 @@ public:
if (f1)
expect (false);
std::function<int()> f2 ([]() { return 11; });
f2 = nullptr;
std::function<int()> f2 ([]() { return 11; });
f2 = nullptr;
if (f2)
expect (false);
}

View file

@ -20,6 +20,11 @@
==============================================================================
*/
#if ! JUCE_MINGW
#pragma intrinsic (__cpuid)
#pragma intrinsic (__rdtsc)
#endif
void Logger::outputDebugString (const String& text)
{
OutputDebugString ((text + "\n").toWideCharPointer());
@ -32,8 +37,6 @@ void Logger::outputDebugString (const String& text)
#endif
//==============================================================================
#pragma intrinsic (__cpuid)
#pragma intrinsic (__rdtsc)
#if JUCE_MINGW
static void callCPUID (int result[4], uint32 type)
@ -84,7 +87,7 @@ String SystemStats::getCpuModel()
const int numExtIDs = info[0];
if (numExtIDs < 0x80000004) // if brand string is unsupported
if ((unsigned) numExtIDs < 0x80000004) // if brand string is unsupported
return {};
callCPUID (info, 0x80000002);

View file

@ -100,7 +100,7 @@ namespace SocketHelpers
#if JUCE_WINDOWS
ignoreUnused (portNumber, isListener, readLock);
if (h != SOCKET_ERROR || connected)
if (h != (unsigned) SOCKET_ERROR || connected)
closesocket (h);
// make sure any read process finishes before we delete the socket

View file

@ -97,7 +97,7 @@ private:
static int pad (void*, size_t, 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];

View file

@ -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 < 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);
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;

View file

@ -178,7 +178,6 @@ class FlexBox;
#include "mouse/juce_DragAndDropContainer.h"
#include "mouse/juce_FileDragAndDropTarget.h"
#include "mouse/juce_SelectedItemSet.h"
#include "mouse/juce_LassoComponent.h"
#include "mouse/juce_MouseInactivityDetector.h"
#include "mouse/juce_TextDragAndDropTarget.h"
#include "mouse/juce_TooltipClient.h"
@ -286,6 +285,7 @@ class FlexBox;
#include "lookandfeel/juce_LookAndFeel_V1.h"
#include "lookandfeel/juce_LookAndFeel_V3.h"
#include "lookandfeel/juce_LookAndFeel_V4.h"
#include "mouse/juce_LassoComponent.h"
#if JUCE_LINUX
#include "native/juce_linux_X11.h"

View file

@ -788,7 +788,7 @@ struct UWPUIViewSettings
auto status = roInitialize (1);
if (status != S_OK && status != S_FALSE && status != 0x80010106L)
if (status != S_OK && status != S_FALSE && (unsigned) status != 0x80010106L)
return;
LPCWSTR uwpClassName = L"Windows.UI.ViewManagement.UIViewSettings";

View file

@ -45,7 +45,7 @@
#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.
These files are provided in the normal Windows SDK. */
#include <dshow.h>

View file

@ -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
#include "../native/juce_mac_Video.h"