diff options
author | comex <[email protected]> | 2023-08-20 13:05:49 -0700 |
---|---|---|
committer | Liam <[email protected]> | 2023-08-25 19:22:31 -0400 |
commit | 91eb5afd0b7c75213763d379638bac6d53548557 (patch) | |
tree | 3574c1aa4075518bbf3b0f96c262f16ae0f5a0c5 /src/CMakeLists.txt | |
parent | bc4e58eb5180a1755d76a24ddc7684cc5d70f2b1 (diff) | |
download | yuzu-mainline-91eb5afd0b7c75213763d379638bac6d53548557.tar.gz yuzu-mainline-91eb5afd0b7c75213763d379638bac6d53548557.zip |
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".
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7bb88c8ea..015b98d60 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -117,6 +117,7 @@ else() $<$<CXX_COMPILER_ID:Clang>:-Wno-braced-scalar-init> $<$<CXX_COMPILER_ID:Clang>:-Wno-unused-private-field> + $<$<CXX_COMPILER_ID:Clang>:-Wno-nullability-completeness> $<$<CXX_COMPILER_ID:Clang>:-Werror=shadow-uncaptured-local> $<$<CXX_COMPILER_ID:Clang>:-Werror=implicit-fallthrough> $<$<CXX_COMPILER_ID:Clang>:-Werror=type-limits> |