diff options
| author | 2023-08-26 19:14:17 -0400 | |
|---|---|---|
| committer | 2023-08-26 19:14:17 -0400 | |
| commit | 1ac2615adbd3bf011af96b016080662e9f3ba8f7 (patch) | |
| tree | 6db9e80757e7af611b3836cbb0454ffd163e5c10 /src | |
| parent | Merge pull request #11377 from BenjaminHalko/reverse-slider-input (diff) | |
| parent | Skip additional mbedcrypto warnings options on MSVC (diff) | |
| download | yuzu-1ac2615adbd3bf011af96b016080662e9f3ba8f7.tar.gz yuzu-1ac2615adbd3bf011af96b016080662e9f3ba8f7.tar.xz yuzu-1ac2615adbd3bf011af96b016080662e9f3ba8f7.zip | |
Merge pull request #11338 from comex/warning-fixes-august-2023
Warnings cleanup for GCC 13 and Clang 16
Diffstat (limited to '')
| -rw-r--r-- | src/CMakeLists.txt | 19 | ||||
| -rw-r--r-- | src/common/swap.h | 5 | ||||
| -rw-r--r-- | src/input_common/input_poller.cpp | 10 | ||||
| -rw-r--r-- | src/web_service/verify_user_jwt.cpp | 1 |
4 files changed, 17 insertions, 18 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7bb88c8ea..6068c7a1f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt | |||
| @@ -114,16 +114,19 @@ else() | |||
| 114 | -Wno-attributes | 114 | -Wno-attributes |
| 115 | -Wno-invalid-offsetof | 115 | -Wno-invalid-offsetof |
| 116 | -Wno-unused-parameter | 116 | -Wno-unused-parameter |
| 117 | |||
| 118 | $<$<CXX_COMPILER_ID:Clang>:-Wno-braced-scalar-init> | ||
| 119 | $<$<CXX_COMPILER_ID:Clang>:-Wno-unused-private-field> | ||
| 120 | $<$<CXX_COMPILER_ID:Clang>:-Werror=shadow-uncaptured-local> | ||
| 121 | $<$<CXX_COMPILER_ID:Clang>:-Werror=implicit-fallthrough> | ||
| 122 | $<$<CXX_COMPILER_ID:Clang>:-Werror=type-limits> | ||
| 123 | $<$<CXX_COMPILER_ID:AppleClang>:-Wno-braced-scalar-init> | ||
| 124 | $<$<CXX_COMPILER_ID:AppleClang>:-Wno-unused-private-field> | ||
| 125 | ) | 117 | ) |
| 126 | 118 | ||
| 119 | if (CMAKE_CXX_COMPILER_ID MATCHES Clang) # Clang or AppleClang | ||
| 120 | add_compile_options( | ||
| 121 | -Wno-braced-scalar-init | ||
| 122 | -Wno-unused-private-field | ||
| 123 | -Wno-nullability-completeness | ||
| 124 | -Werror=shadow-uncaptured-local | ||
| 125 | -Werror=implicit-fallthrough | ||
| 126 | -Werror=type-limits | ||
| 127 | ) | ||
| 128 | endif() | ||
| 129 | |||
| 127 | if (ARCHITECTURE_x86_64) | 130 | if (ARCHITECTURE_x86_64) |
| 128 | add_compile_options("-mcx16") | 131 | add_compile_options("-mcx16") |
| 129 | add_compile_options("-fwrapv") | 132 | add_compile_options("-fwrapv") |
diff --git a/src/common/swap.h b/src/common/swap.h index 085baaf9a..fde343e45 100644 --- a/src/common/swap.h +++ b/src/common/swap.h | |||
| @@ -460,11 +460,6 @@ S operator&(const S& i, const swap_struct_t<T, F> v) { | |||
| 460 | return i & v.swap(); | 460 | return i & v.swap(); |
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | template <typename S, typename T, typename F> | ||
| 464 | S operator&(const swap_struct_t<T, F> v, const S& i) { | ||
| 465 | return static_cast<S>(v.swap() & i); | ||
| 466 | } | ||
| 467 | |||
| 468 | // Comparison | 463 | // Comparison |
| 469 | template <typename S, typename T, typename F> | 464 | template <typename S, typename T, typename F> |
| 470 | bool operator<(const S& p, const swap_struct_t<T, F> v) { | 465 | bool operator<(const S& p, const swap_struct_t<T, F> v) { |
diff --git a/src/input_common/input_poller.cpp b/src/input_common/input_poller.cpp index 870e76ab0..188e862d7 100644 --- a/src/input_common/input_poller.cpp +++ b/src/input_common/input_poller.cpp | |||
| @@ -835,15 +835,15 @@ public: | |||
| 835 | return input_engine->SupportsNfc(identifier); | 835 | return input_engine->SupportsNfc(identifier); |
| 836 | } | 836 | } |
| 837 | 837 | ||
| 838 | Common::Input::NfcState StartNfcPolling() { | 838 | Common::Input::NfcState StartNfcPolling() override { |
| 839 | return input_engine->StartNfcPolling(identifier); | 839 | return input_engine->StartNfcPolling(identifier); |
| 840 | } | 840 | } |
| 841 | 841 | ||
| 842 | Common::Input::NfcState StopNfcPolling() { | 842 | Common::Input::NfcState StopNfcPolling() override { |
| 843 | return input_engine->StopNfcPolling(identifier); | 843 | return input_engine->StopNfcPolling(identifier); |
| 844 | } | 844 | } |
| 845 | 845 | ||
| 846 | Common::Input::NfcState ReadAmiiboData(std::vector<u8>& out_data) { | 846 | Common::Input::NfcState ReadAmiiboData(std::vector<u8>& out_data) override { |
| 847 | return input_engine->ReadAmiiboData(identifier, out_data); | 847 | return input_engine->ReadAmiiboData(identifier, out_data); |
| 848 | } | 848 | } |
| 849 | 849 | ||
| @@ -852,11 +852,11 @@ public: | |||
| 852 | } | 852 | } |
| 853 | 853 | ||
| 854 | Common::Input::NfcState ReadMifareData(const Common::Input::MifareRequest& request, | 854 | Common::Input::NfcState ReadMifareData(const Common::Input::MifareRequest& request, |
| 855 | Common::Input::MifareRequest& out_data) { | 855 | Common::Input::MifareRequest& out_data) override { |
| 856 | return input_engine->ReadMifareData(identifier, request, out_data); | 856 | return input_engine->ReadMifareData(identifier, request, out_data); |
| 857 | } | 857 | } |
| 858 | 858 | ||
| 859 | Common::Input::NfcState WriteMifareData(const Common::Input::MifareRequest& request) { | 859 | Common::Input::NfcState WriteMifareData(const Common::Input::MifareRequest& request) override { |
| 860 | return input_engine->WriteMifareData(identifier, request); | 860 | return input_engine->WriteMifareData(identifier, request); |
| 861 | } | 861 | } |
| 862 | 862 | ||
diff --git a/src/web_service/verify_user_jwt.cpp b/src/web_service/verify_user_jwt.cpp index 129eb1968..f88f67620 100644 --- a/src/web_service/verify_user_jwt.cpp +++ b/src/web_service/verify_user_jwt.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #if defined(__GNUC__) || defined(__clang__) | 4 | #if defined(__GNUC__) || defined(__clang__) |
| 5 | #pragma GCC diagnostic push | 5 | #pragma GCC diagnostic push |
| 6 | #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" | 6 | #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" |
| 7 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" // for deprecated OpenSSL functions | ||
| 7 | #endif | 8 | #endif |
| 8 | #include <jwt/jwt.hpp> | 9 | #include <jwt/jwt.hpp> |
| 9 | #if defined(__GNUC__) || defined(__clang__) | 10 | #if defined(__GNUC__) || defined(__clang__) |