1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Warnings: Add missing field initialisers warning

This commit is contained in:
Anthony Nicholls 2023-08-11 16:33:37 +01:00
parent 2a9ea9e534
commit c014e1e9a2
3 changed files with 6 additions and 3 deletions

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

View file

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

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*
{