Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -Werror=implicit-fallthrough to cmake build #15020

Merged
merged 1 commit into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions buildfiles/cmake/ConfigureCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions rpcs3/Emu/Cell/Modules/cellSaveData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions rpcs3/Emu/Cell/Modules/cellVoice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ error_code cellVoiceCreatePort(vm::ptr<u32> portId, vm::cptr<CellVoicePortParam>
return CELL_VOICE_ERROR_ARGUMENT_INVALID;
}
}
break;
}
case CELLVOICE_PORTTYPE_IN_MIC:
case CELLVOICE_PORTTYPE_OUT_SECONDARY:
Expand Down
1 change: 1 addition & 0 deletions rpcs3/Emu/Cell/lv2/sys_ss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ error_code sys_ss_appliance_info_manager(u32 code, vm::ptr<u8> 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);
}
Expand Down
1 change: 1 addition & 0 deletions rpcs3/Emu/RSX/GL/GLShaderInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace gl
{
default:
rsx_log.fatal("Unexpected program domain %d", static_cast<int>(domain));
[[fallthrough]];
case ::glsl::program_domain::glsl_vertex_program:
pname = GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS; break;
case ::glsl::program_domain::glsl_fragment_program:
Expand Down
1 change: 1 addition & 0 deletions rpcs3/Emu/RSX/VK/VKMemAlloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class VmaRWMutex
#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
Expand Down
1 change: 1 addition & 0 deletions rpcs3/rpcs3qt/emu_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ QString emu_settings::GetLocalizedSetting(const QString& original, emu_settings_
default:
break;
}
break;
case emu_settings_type::KeyboardType:
switch (static_cast<CellKbMappingType>(index))
{
Expand Down
2 changes: 2 additions & 0 deletions rpcs3/rpcs3qt/rpcn_settings_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
RipleyTom marked this conversation as resolved.
Show resolved Hide resolved
}
case QMessageBox::Yes:
{
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions rpcs3/stb_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down