diff options
| author | 2022-10-21 02:34:06 -0400 | |
|---|---|---|
| committer | 2022-10-22 15:02:04 -0400 | |
| commit | 93297d14d8fc5c8f73e8ccba5ca989590a453c05 (patch) | |
| tree | 4b25f5ceda595051501136a7f3000e7ef989e1f1 /src | |
| parent | CMakeLists: Consolidate all unused warnings into -Wunused (diff) | |
| download | yuzu-93297d14d8fc5c8f73e8ccba5ca989590a453c05.tar.gz yuzu-93297d14d8fc5c8f73e8ccba5ca989590a453c05.tar.xz yuzu-93297d14d8fc5c8f73e8ccba5ca989590a453c05.zip | |
CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | src/audio_core/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | src/common/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 7 | ||||
| -rw-r--r-- | src/input_common/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/shader_recompiler/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | src/video_core/CMakeLists.txt | 8 |
7 files changed, 4 insertions, 45 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f774c2791..71853eaad 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt | |||
| @@ -100,16 +100,9 @@ if (MSVC) | |||
| 100 | else() | 100 | else() |
| 101 | add_compile_options( | 101 | add_compile_options( |
| 102 | -Werror=all | 102 | -Werror=all |
| 103 | -Werror=array-bounds | ||
| 104 | -Werror=extra | 103 | -Werror=extra |
| 105 | -Werror=implicit-fallthrough | ||
| 106 | -Werror=missing-declarations | 104 | -Werror=missing-declarations |
| 107 | -Werror=missing-field-initializers | ||
| 108 | -Werror=reorder | ||
| 109 | -Werror=shadow | 105 | -Werror=shadow |
| 110 | -Werror=sign-compare | ||
| 111 | -Werror=switch | ||
| 112 | -Werror=uninitialized | ||
| 113 | -Werror=unused | 106 | -Werror=unused |
| 114 | 107 | ||
| 115 | -Wno-attributes | 108 | -Wno-attributes |
diff --git a/src/audio_core/CMakeLists.txt b/src/audio_core/CMakeLists.txt index 144f1bab2..01b4ffd88 100644 --- a/src/audio_core/CMakeLists.txt +++ b/src/audio_core/CMakeLists.txt | |||
| @@ -206,20 +206,10 @@ if (MSVC) | |||
| 206 | /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data | 206 | /we4244 # 'conversion': conversion from 'type1' to 'type2', possible loss of data |
| 207 | /we4245 # 'conversion': conversion from 'type1' to 'type2', signed/unsigned mismatch | 207 | /we4245 # 'conversion': conversion from 'type1' to 'type2', signed/unsigned mismatch |
| 208 | /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data | 208 | /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data |
| 209 | /we4456 # Declaration of 'identifier' hides previous local declaration | ||
| 210 | /we4457 # Declaration of 'identifier' hides function parameter | ||
| 211 | /we4458 # Declaration of 'identifier' hides class member | ||
| 212 | /we4459 # Declaration of 'identifier' hides global declaration | ||
| 213 | ) | 209 | ) |
| 214 | else() | 210 | else() |
| 215 | target_compile_options(audio_core PRIVATE | 211 | target_compile_options(audio_core PRIVATE |
| 216 | -Werror=conversion | 212 | -Werror=conversion |
| 217 | -Werror=ignored-qualifiers | ||
| 218 | -Werror=shadow | ||
| 219 | -Werror=unused-variable | ||
| 220 | |||
| 221 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | ||
| 222 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | ||
| 223 | 213 | ||
| 224 | -Wno-sign-conversion | 214 | -Wno-sign-conversion |
| 225 | ) | 215 | ) |
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 46cf75fde..6da547a3f 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -160,8 +160,6 @@ if (MSVC) | |||
| 160 | ) | 160 | ) |
| 161 | else() | 161 | else() |
| 162 | target_compile_options(common PRIVATE | 162 | target_compile_options(common PRIVATE |
| 163 | -Werror | ||
| 164 | |||
| 165 | $<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation> | 163 | $<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation> |
| 166 | ) | 164 | ) |
| 167 | endif() | 165 | endif() |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 055bea641..72da9cb56 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -778,15 +778,10 @@ if (MSVC) | |||
| 778 | else() | 778 | else() |
| 779 | target_compile_options(core PRIVATE | 779 | target_compile_options(core PRIVATE |
| 780 | -Werror=conversion | 780 | -Werror=conversion |
| 781 | -Werror=ignored-qualifiers | ||
| 782 | 781 | ||
| 783 | $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> | 782 | -Wno-sign-conversion |
| 784 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | ||
| 785 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | ||
| 786 | 783 | ||
| 787 | $<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation> | 784 | $<$<CXX_COMPILER_ID:Clang>:-fsized-deallocation> |
| 788 | |||
| 789 | -Wno-sign-conversion | ||
| 790 | ) | 785 | ) |
| 791 | endif() | 786 | endif() |
| 792 | 787 | ||
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 2cf9eb97f..7935ac655 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -48,12 +48,7 @@ if (MSVC) | |||
| 48 | ) | 48 | ) |
| 49 | else() | 49 | else() |
| 50 | target_compile_options(input_common PRIVATE | 50 | target_compile_options(input_common PRIVATE |
| 51 | -Werror | ||
| 52 | -Werror=conversion | 51 | -Werror=conversion |
| 53 | -Werror=ignored-qualifiers | ||
| 54 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | ||
| 55 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | ||
| 56 | -Werror=unused-variable | ||
| 57 | ) | 52 | ) |
| 58 | endif() | 53 | endif() |
| 59 | 54 | ||
diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt index af8e51fe8..cbc1daf77 100644 --- a/src/shader_recompiler/CMakeLists.txt +++ b/src/shader_recompiler/CMakeLists.txt | |||
| @@ -242,23 +242,17 @@ if (MSVC) | |||
| 242 | target_compile_options(shader_recompiler PRIVATE | 242 | target_compile_options(shader_recompiler PRIVATE |
| 243 | /W4 | 243 | /W4 |
| 244 | /WX | 244 | /WX |
| 245 | /we4018 # 'expression' : signed/unsigned mismatch | 245 | |
| 246 | /we4242 # 'identifier': conversion from 'type1' to 'type2', possible loss of data | ||
| 246 | /we4244 # 'argument' : conversion from 'type1' to 'type2', possible loss of data (floating-point) | 247 | /we4244 # 'argument' : conversion from 'type1' to 'type2', possible loss of data (floating-point) |
| 247 | /we4245 # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch | 248 | /we4245 # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch |
| 248 | /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data | 249 | /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data |
| 249 | /we4267 # 'var' : conversion from 'size_t' to 'type', possible loss of data | ||
| 250 | /we4305 # 'context' : truncation from 'type1' to 'type2' | ||
| 251 | /we4800 # Implicit conversion from 'type' to bool. Possible information loss | 250 | /we4800 # Implicit conversion from 'type' to bool. Possible information loss |
| 252 | /we4826 # Conversion from 'type1' to 'type2' is sign-extended. This may cause unexpected runtime behavior. | 251 | /we4826 # Conversion from 'type1' to 'type2' is sign-extended. This may cause unexpected runtime behavior. |
| 253 | ) | 252 | ) |
| 254 | else() | 253 | else() |
| 255 | target_compile_options(shader_recompiler PRIVATE | 254 | target_compile_options(shader_recompiler PRIVATE |
| 256 | -Werror | ||
| 257 | -Werror=conversion | 255 | -Werror=conversion |
| 258 | -Werror=ignored-qualifiers | ||
| 259 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | ||
| 260 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | ||
| 261 | -Werror=unused-variable | ||
| 262 | 256 | ||
| 263 | # Bracket depth determines maximum size of a fold expression in Clang since 9c9974c3ccb6. | 257 | # Bracket depth determines maximum size of a fold expression in Clang since 9c9974c3ccb6. |
| 264 | # And this in turns limits the size of a std::array. | 258 | # And this in turns limits the size of a std::array. |
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index cb8b46edf..106991969 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt | |||
| @@ -279,14 +279,8 @@ if (MSVC) | |||
| 279 | else() | 279 | else() |
| 280 | target_compile_options(video_core PRIVATE | 280 | target_compile_options(video_core PRIVATE |
| 281 | -Werror=conversion | 281 | -Werror=conversion |
| 282 | -Wno-error=sign-conversion | ||
| 283 | -Werror=pessimizing-move | ||
| 284 | -Werror=redundant-move | ||
| 285 | -Werror=type-limits | ||
| 286 | 282 | ||
| 287 | $<$<CXX_COMPILER_ID:GNU>:-Werror=class-memaccess> | 283 | -Wno-sign-conversion |
| 288 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter> | ||
| 289 | $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> | ||
| 290 | ) | 284 | ) |
| 291 | endif() | 285 | endif() |
| 292 | 286 | ||