diff --git a/buildfiles/cmake/ConfigureCompiler.cmake b/buildfiles/cmake/ConfigureCompiler.cmake index 1e1c023608..65ca678bcd 100644 --- a/buildfiles/cmake/ConfigureCompiler.cmake +++ b/buildfiles/cmake/ConfigureCompiler.cmake @@ -51,6 +51,7 @@ else() add_compile_options(-Werror=return-type) add_compile_options(-Werror=overloaded-virtual) add_compile_options(-Werror=missing-noreturn) + add_compile_options(-Werror=implicit-fallthrough) add_compile_options(-Wunused-parameter) add_compile_options(-Wignored-qualifiers) add_compile_options(-Wredundant-move) diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index f5818296d4..ddc122cab4 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -1657,9 +1657,8 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v //CELL_SAVEDATA_RECREATE_NO = overwrite and let the user know, not data is corrupt. //cellSaveData.error("Savedata %s considered broken", save_entry.dirName); //TODO: if this is a save, and it's not auto, then show a dialog - // fallthrough + [[fallthrough]]; } - case CELL_SAVEDATA_RECREATE_NO_NOBROKEN: { break; diff --git a/rpcs3/Emu/Cell/Modules/cellVoice.cpp b/rpcs3/Emu/Cell/Modules/cellVoice.cpp index 48b495d96f..e577a3aa42 100644 --- a/rpcs3/Emu/Cell/Modules/cellVoice.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVoice.cpp @@ -156,6 +156,7 @@ error_code cellVoiceCreatePort(vm::ptr portId, vm::cptr return CELL_VOICE_ERROR_ARGUMENT_INVALID; } } + break; } case CELLVOICE_PORTTYPE_IN_MIC: case CELLVOICE_PORTTYPE_OUT_SECONDARY: diff --git a/rpcs3/Emu/Cell/lv2/sys_ss.cpp b/rpcs3/Emu/Cell/lv2/sys_ss.cpp index 312c7910f3..c54d5fa707 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ss.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ss.cpp @@ -266,6 +266,7 @@ error_code sys_ss_appliance_info_manager(u32 code, vm::ptr buffer) case 0x19006: { // qa values (dex only) ?? + [[fallthrough]]; } default: sys_ss.todo("sys_ss_appliance_info_manager(code=0x%x, buffer=*0x%x)", code, buffer); } diff --git a/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp b/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp index cfa1a36092..1dfd0f4996 100644 --- a/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp +++ b/rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp @@ -20,6 +20,7 @@ namespace gl { default: rsx_log.fatal("Unexpected program domain %d", static_cast(domain)); + [[fallthrough]]; case ::glsl::program_domain::glsl_vertex_program: pname = GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS; break; case ::glsl::program_domain::glsl_fragment_program: diff --git a/rpcs3/Emu/RSX/VK/VKMemAlloc.cpp b/rpcs3/Emu/RSX/VK/VKMemAlloc.cpp index ba55c218e0..e3a1d90a42 100644 --- a/rpcs3/Emu/RSX/VK/VKMemAlloc.cpp +++ b/rpcs3/Emu/RSX/VK/VKMemAlloc.cpp @@ -46,6 +46,7 @@ private: #pragma GCC diagnostic ignored "-Wsuggest-override" #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #ifdef __clang__ #pragma clang diagnostic ignored "-Winconsistent-missing-override" #else diff --git a/rpcs3/rpcs3qt/emu_settings.cpp b/rpcs3/rpcs3qt/emu_settings.cpp index ccb7bc6815..492d4ca240 100644 --- a/rpcs3/rpcs3qt/emu_settings.cpp +++ b/rpcs3/rpcs3qt/emu_settings.cpp @@ -1238,6 +1238,7 @@ QString emu_settings::GetLocalizedSetting(const QString& original, emu_settings_ default: break; } + break; case emu_settings_type::KeyboardType: switch (static_cast(index)) { diff --git a/rpcs3/rpcs3qt/rpcn_settings_dialog.cpp b/rpcs3/rpcs3qt/rpcn_settings_dialog.cpp index acd5c50e5b..58dd5b8d7d 100644 --- a/rpcs3/rpcs3qt/rpcn_settings_dialog.cpp +++ b/rpcs3/rpcs3qt/rpcn_settings_dialog.cpp @@ -800,6 +800,7 @@ void rpcn_account_edit_dialog::change_password() QMessageBox::information(this, tr("Password Reset Token Sent!"), tr("The reset password token has successfully been sent!"), QMessageBox::Ok); } + [[fallthrough]]; } case QMessageBox::Yes: { @@ -844,6 +845,7 @@ void rpcn_account_edit_dialog::change_password() QMessageBox::information(this, tr("Password Successfully Changed!"), tr("Your password has been successfully changed!"), QMessageBox::Ok); } + break; } default: return; diff --git a/rpcs3/stb_image.cpp b/rpcs3/stb_image.cpp index d4f9674fff..d9e32e229a 100644 --- a/rpcs3/stb_image.cpp +++ b/rpcs3/stb_image.cpp @@ -18,6 +18,7 @@ #pragma GCC diagnostic ignored "-Wold-style-cast" #pragma GCC diagnostic ignored "-Wstrict-aliasing" #pragma GCC diagnostic ignored "-Wcast-qual" +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" #ifndef __clang__ #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #pragma GCC diagnostic ignored "-Wduplicated-branches"