From 8a02473237b370c4872d095663c28a0837c09932 Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 10 Jul 2016 21:51:28 -0400 Subject: [PATCH] Fix more warnings: - Externals/soundtouch/CMakeLists.txt: add -w (since it's not our code) to silence an unused variable warning - Source/Core/Core/NetPlayClient.cpp: Work around a Clang/libc++ bug where initializing a std::array the way the standard says you're supposed to produces a warning. (libc++'s implementation of std::array, like any sane implementation, has a C array as a field, so the most explicit form of initialization would use two braces, one for the struct and one for the array. Clang has a general warning for not being explicit with braces, which is usually sane. But the standard only guarantees that initializing std::array works with a single pair of braces!) There are other places in Dolphin that incorrectly use double braces, presumably to avoid the warning, so maybe the warning should just be turned off, but in any case here I just switch to an equivalent .fill(). --- Externals/soundtouch/CMakeLists.txt | 1 + Source/Core/Core/NetPlayClient.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Externals/soundtouch/CMakeLists.txt b/Externals/soundtouch/CMakeLists.txt index b7a2e5dc05..74acedfb4f 100644 --- a/Externals/soundtouch/CMakeLists.txt +++ b/Externals/soundtouch/CMakeLists.txt @@ -16,3 +16,4 @@ set(SRCS ) add_library(SoundTouch STATIC ${SRCS}) +add_definitions(-w) diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index e0639e9c1e..0dac4bb272 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -722,7 +722,7 @@ bool NetPlayClient::StartGame(const std::string& path) // Needed to prevent locking up at boot if (when) the wiimotes connect out of order. NetWiimote nw; nw.resize(4, 0); - m_wiimote_current_data_size = {4, 4, 4, 4}; + m_wiimote_current_data_size.fill(4); for (unsigned int w = 0; w < 4; ++w) {