Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more warnings: #3998

Merged
merged 1 commit into from Jul 11, 2016
Merged

Fix more warnings: #3998

merged 1 commit into from Jul 11, 2016

Conversation

comex
Copy link
Contributor

@comex comex commented Jul 11, 2016

  • 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().

This change is Reviewable

- 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().
@delroth delroth merged commit 8de6800 into dolphin-emu:master Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants