Browse Source

MinGW: Fixed some build warnings

tags/2021-05-28
tpoole 8 years ago
parent
commit
10b7aa3c16
10 changed files with 25 additions and 13 deletions
  1. +10
    -1
      modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c
  2. +2
    -2
      modules/juce_core/misc/juce_StdFunctionCompat.cpp
  3. +6
    -3
      modules/juce_core/native/juce_win32_SystemStats.cpp
  4. +1
    -1
      modules/juce_core/network/juce_Socket.cpp
  5. +1
    -1
      modules/juce_cryptography/encryption/juce_BlowFish.h
  6. +1
    -1
      modules/juce_graphics/colour/juce_Colour.cpp
  7. +1
    -1
      modules/juce_gui_basics/juce_gui_basics.h
  8. +1
    -1
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp
  9. +1
    -1
      modules/juce_video/juce_video.cpp
  10. +1
    -1
      modules/juce_video/playback/juce_VideoComponent.cpp

+ 10
- 1
modules/juce_audio_formats/codecs/oggvorbis/libvorbis-1.3.2/lib/vorbisfile.c 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

+ 2
- 2
modules/juce_core/misc/juce_StdFunctionCompat.cpp 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);
}


+ 6
- 3
modules/juce_core/native/juce_win32_SystemStats.cpp 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);


+ 1
- 1
modules/juce_core/network/juce_Socket.cpp 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


+ 1
- 1
modules/juce_cryptography/encryption/juce_BlowFish.h 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];


+ 1
- 1
modules/juce_graphics/colour/juce_Colour.cpp 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;


+ 1
- 1
modules/juce_gui_basics/juce_gui_basics.h 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"


+ 1
- 1
modules/juce_gui_basics/native/juce_win32_Windowing.cpp 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";


+ 1
- 1
modules/juce_video/juce_video.cpp 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>


+ 1
- 1
modules/juce_video/playback/juce_VideoComponent.cpp 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"


Loading…
Cancel
Save