Browse Source

Warnings: Add missing field initialisers warning

v7.0.9
Anthony Nicholls 1 year ago
parent
commit
c014e1e9a2
3 changed files with 6 additions and 3 deletions
  1. +2
    -0
      extras/Build/CMake/JUCEHelperTargets.cmake
  2. +2
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h
  3. +2
    -2
      modules/juce_core/native/juce_Threads_mac.mm

+ 2
- 0
extras/Build/CMake/JUCEHelperTargets.cmake View File

@@ -65,6 +65,7 @@ elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQU
-Wpedantic
-Wdeprecated
-Wfloat-equal
-Wmissing-field-initializers
$<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>:
-Wzero-as-null-pointer-constant
-Wunused-private-field
@@ -94,6 +95,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-Wno-strict-overflow
-Wshadow
-Wfloat-equal
-Wmissing-field-initializers
$<$<COMPILE_LANGUAGE:CXX>:
-Woverloaded-virtual
-Wreorder


+ 2
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExporter.h View File

@@ -339,7 +339,8 @@ public:
"-Wswitch-enum",
"-Wuninitialized",
"-Wunreachable-code",
"-Wunused-parameter"
"-Wunused-parameter",
"-Wmissing-field-initializers"
};
result.cpp = {


+ 2
- 2
modules/juce_core/native/juce_Threads_mac.mm View File

@@ -128,10 +128,10 @@ bool Thread::createNativeThread (Priority priority)
struct ThreadData
{
Thread& thread;
std::promise<bool> started;
std::promise<bool> started{};
};
ThreadData threadData { *this };
ThreadData threadData { *this, {} };
threadId = threadHandle = makeThreadHandle (attribute, &threadData, [] (void* userData) -> void*
{


Loading…
Cancel
Save