From 0327ecc5c108189c939a63ae2112b396668ef82a Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 13 Mar 2021 18:46:59 +0300 Subject: [PATCH] Enable -Wduplicated-cond (GCC) --- rpcs3/Emu/Cell/Modules/cellAdec.cpp | 3 +-- rpcs3/cmake_modules/ConfigureCompiler.cmake | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellAdec.cpp b/rpcs3/Emu/Cell/Modules/cellAdec.cpp index bcbcf98989..75ce35ea37 100644 --- a/rpcs3/Emu/Cell/Modules/cellAdec.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAdec.cpp @@ -719,8 +719,7 @@ next: goto next; } - // TODO:: Syphurith: I don't know whether we should keep this else-if now. Since the if condition is same with this one. - else if (adec.reader.size < static_cast(buf_size)) + else if (adec.reader.size < static_cast(buf_size) && 0) { buf_size = adec.reader.size; } diff --git a/rpcs3/cmake_modules/ConfigureCompiler.cmake b/rpcs3/cmake_modules/ConfigureCompiler.cmake index 7c51909955..cc175a4f91 100644 --- a/rpcs3/cmake_modules/ConfigureCompiler.cmake +++ b/rpcs3/cmake_modules/ConfigureCompiler.cmake @@ -51,7 +51,7 @@ else() add_compile_options(-Wclobbered) add_compile_options(-Wcast-function-type) add_compile_options(-Wduplicated-branches) - #add_compile_options(-Wduplicated-cond) + add_compile_options(-Wduplicated-cond) #add_compile_options(-Wredundant-decls) endif()