From 91eb5afd0b7c75213763d379638bac6d53548557 Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 20 Aug 2023 13:05:49 -0700 Subject: Warnings cleanup for GCC 13 and Clang 16 Note: For GCC there are still a huge number of `-Warray-bounds` warnings coming from `externals/dynarmic`. I could have added a workaround in `externals/CMakeLists.txt` similar to what this PR does for other externals, but given Dynarmic's close affiliation with Yuzu, it would be better to fix it upstream. Besides that, on my machine, this makes the build warning-free except for some warnings from glslangValidator and AutoMoc. Details: - Disable some warnings in externals. - Disable `-Wnullability-completeness`, which is a Clang warning triggered by the Vulkan SDK where if any pointers in the header are marked _Nullable, it wants all pointers to be marked _Nullable or _Nonnull. Most of them are, but some aren't. Who knows why. - `src/web_service/verify_user_jwt.cpp`: Disable another warning when including `jwt.hpp`. - `src/input_common/input_poller.cpp`: Add missing `override` specifiers. - src/common/swap.h: Remove redundant `operator&`. In general, this file declares three overloads of each operator. Using `+` as an example, the overloads are: - a member function for `swapped_t + integer` - a member function for `swapped_t + swapped_t` - a free function for `integer + swapped_t` But for `operator&`, there was an additional free function for `swapped_t + integer`, which was redundant with the member function. This caused a GCC warning saying "ISO C++ says that these are ambiguous". --- src/input_common/input_poller.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/input_common') 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: return input_engine->SupportsNfc(identifier); } - Common::Input::NfcState StartNfcPolling() { + Common::Input::NfcState StartNfcPolling() override { return input_engine->StartNfcPolling(identifier); } - Common::Input::NfcState StopNfcPolling() { + Common::Input::NfcState StopNfcPolling() override { return input_engine->StopNfcPolling(identifier); } - Common::Input::NfcState ReadAmiiboData(std::vector& out_data) { + Common::Input::NfcState ReadAmiiboData(std::vector& out_data) override { return input_engine->ReadAmiiboData(identifier, out_data); } @@ -852,11 +852,11 @@ public: } Common::Input::NfcState ReadMifareData(const Common::Input::MifareRequest& request, - Common::Input::MifareRequest& out_data) { + Common::Input::MifareRequest& out_data) override { return input_engine->ReadMifareData(identifier, request, out_data); } - Common::Input::NfcState WriteMifareData(const Common::Input::MifareRequest& request) { + Common::Input::NfcState WriteMifareData(const Common::Input::MifareRequest& request) override { return input_engine->WriteMifareData(identifier, request); } -- cgit v1.2.3