mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
MinGW: Fix windows/gcc warnings
This commit is contained in:
parent
688581ff39
commit
092bc44413
24 changed files with 310 additions and 260 deletions
|
|
@ -21,7 +21,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
-Wunreachable-code -Wzero-as-null-pointer-constant -Wcast-align
|
||||
-Wno-implicit-fallthrough -Wno-maybe-uninitialized
|
||||
-Wno-missing-field-initializers -Wno-ignored-qualifiers -Wswitch-enum
|
||||
-Wswitch-default -Wredundant-decls)
|
||||
-Wredundant-decls)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.0.0")
|
||||
target_compile_options(juce_recommended_warning_flags INTERFACE "-Wno-strict-overflow")
|
||||
|
|
|
|||
|
|
@ -549,9 +549,19 @@ function(juce_add_module module_path)
|
|||
|
||||
_juce_link_libs_from_metadata("${module_name}" "${metadata_dict}" linuxLibs)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_compile_options(${module_name} INTERFACE /bigobj)
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"))
|
||||
if(module_name STREQUAL "juce_gui_basics")
|
||||
target_compile_options(${module_name} INTERFACE /bigobj)
|
||||
endif()
|
||||
|
||||
_juce_link_libs_from_metadata("${module_name}" "${metadata_dict}" windowsLibs)
|
||||
_juce_link_libs_from_metadata("${module_name}" "${metadata_dict}" windowsLibs)
|
||||
elseif(MSYS OR MINGW)
|
||||
if(module_name STREQUAL "juce_gui_basics")
|
||||
target_compile_options(${module_name} INTERFACE "-Wa,-mbig-obj")
|
||||
endif()
|
||||
|
||||
_juce_link_libs_from_metadata("${module_name}" "${metadata_dict}" mingwLibs)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
_juce_get_metadata("${metadata_dict}" dependencies module_dependencies)
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ void BinaryResources::loadFromCpp (const File& cppFileLocation, const String& cp
|
|||
|
||||
if (c >= '0' && c <= '9')
|
||||
{
|
||||
n = n * 10 + (c - '0');
|
||||
n = n * 10 + (int) (c - '0');
|
||||
}
|
||||
else if (c == ',')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ void sendQuitMessageToIDE (void* server)
|
|||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
|
||||
static HANDLE parentProcessHandle = 0;
|
||||
static HANDLE parentProcessHandle = nullptr;
|
||||
static void setParentProcessID (int pid) { parentProcessHandle = OpenProcess (SYNCHRONIZE, FALSE, (DWORD) pid); }
|
||||
static int getCurrentProcessID() { return (int) GetCurrentProcessId(); }
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ struct CppParserHelpers
|
|||
|
||||
for (int i = 0; i < text.length(); ++i)
|
||||
{
|
||||
const int digit = text[i] - '0';
|
||||
const auto digit = (int) (text[i] - '0');
|
||||
|
||||
if (digit < 0 || digit > 7)
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ struct TranslationHelpers
|
|||
break;
|
||||
|
||||
++p;
|
||||
c = (juce_wchar) ((c << 4) + digitValue);
|
||||
c = (c << 4) + (juce_wchar) digitValue;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -128,12 +128,12 @@ struct TranslationHelpers
|
|||
|
||||
for (int i = 4; --i >= 0;)
|
||||
{
|
||||
const int digitValue = *p - '0';
|
||||
const auto digitValue = (int) (*p - '0');
|
||||
if (digitValue < 0 || digitValue > 7)
|
||||
break;
|
||||
|
||||
++p;
|
||||
c = (juce_wchar) ((c << 3) + digitValue);
|
||||
c = (c << 3) + (juce_wchar) digitValue;
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue