diff options
| author | 2022-11-11 04:12:37 -0800 | |
|---|---|---|
| committer | 2022-11-13 16:30:55 -0800 | |
| commit | 6fa3faec658893c9fae19116232d24dac08babc7 (patch) | |
| tree | 4e04753b659357d6595fa22766ae305586fd90d4 /src/core/hle/service | |
| parent | Merge pull request #9223 from goldenx86/threadcount (diff) | |
| download | yuzu-6fa3faec658893c9fae19116232d24dac08babc7.tar.gz yuzu-6fa3faec658893c9fae19116232d24dac08babc7.tar.xz yuzu-6fa3faec658893c9fae19116232d24dac08babc7.zip | |
Add break for default cases
Visual Studio has an option to search all files in a solution, so I
did a search in there for "default:" looking for any missing break
statements.
I've left out default statements that return something, and that throw
something, even if via ThrowInvalidType. UNREACHABLE leads towards throw
R_THROW macro leads towards a return
Diffstat (limited to 'src/core/hle/service')
6 files changed, 9 insertions, 6 deletions
diff --git a/src/core/hle/service/am/applets/applet_error.cpp b/src/core/hle/service/am/applets/applet_error.cpp index fcf34bf7e..bae0d99a6 100644 --- a/src/core/hle/service/am/applets/applet_error.cpp +++ b/src/core/hle/service/am/applets/applet_error.cpp | |||
| @@ -144,6 +144,7 @@ void Error::Initialize() { | |||
| 144 | break; | 144 | break; |
| 145 | default: | 145 | default: |
| 146 | UNIMPLEMENTED_MSG("Unimplemented LibAppletError mode={:02X}!", mode); | 146 | UNIMPLEMENTED_MSG("Unimplemented LibAppletError mode={:02X}!", mode); |
| 147 | break; | ||
| 147 | } | 148 | } |
| 148 | } | 149 | } |
| 149 | 150 | ||
diff --git a/src/core/hle/service/am/applets/applet_general_backend.cpp b/src/core/hle/service/am/applets/applet_general_backend.cpp index c34ef08b3..e50acdaf6 100644 --- a/src/core/hle/service/am/applets/applet_general_backend.cpp +++ b/src/core/hle/service/am/applets/applet_general_backend.cpp | |||
| @@ -129,6 +129,7 @@ void Auth::Execute() { | |||
| 129 | } | 129 | } |
| 130 | default: | 130 | default: |
| 131 | unimplemented_log(); | 131 | unimplemented_log(); |
| 132 | break; | ||
| 132 | } | 133 | } |
| 133 | } | 134 | } |
| 134 | 135 | ||
| @@ -192,6 +193,7 @@ void PhotoViewer::Execute() { | |||
| 192 | break; | 193 | break; |
| 193 | default: | 194 | default: |
| 194 | UNIMPLEMENTED_MSG("Unimplemented PhotoViewer applet mode={:02X}!", mode); | 195 | UNIMPLEMENTED_MSG("Unimplemented PhotoViewer applet mode={:02X}!", mode); |
| 196 | break; | ||
| 195 | } | 197 | } |
| 196 | } | 198 | } |
| 197 | 199 | ||
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp index ced57dfe6..b97813fbc 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp | |||
| @@ -300,11 +300,10 @@ Kernel::KEvent* nvhost_ctrl_gpu::QueryEvent(u32 event_id) { | |||
| 300 | return error_notifier_event; | 300 | return error_notifier_event; |
| 301 | case 2: | 301 | case 2: |
| 302 | return unknown_event; | 302 | return unknown_event; |
| 303 | default: { | 303 | default: |
| 304 | LOG_CRITICAL(Service_NVDRV, "Unknown Ctrl GPU Event {}", event_id); | 304 | LOG_CRITICAL(Service_NVDRV, "Unknown Ctrl GPU Event {}", event_id); |
| 305 | return nullptr; | ||
| 305 | } | 306 | } |
| 306 | } | ||
| 307 | return nullptr; | ||
| 308 | } | 307 | } |
| 309 | 308 | ||
| 310 | } // namespace Service::Nvidia::Devices | 309 | } // namespace Service::Nvidia::Devices |
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp index 45a759fa8..e123564c6 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp | |||
| @@ -364,11 +364,10 @@ Kernel::KEvent* nvhost_gpu::QueryEvent(u32 event_id) { | |||
| 364 | return sm_exception_breakpoint_pause_report_event; | 364 | return sm_exception_breakpoint_pause_report_event; |
| 365 | case 3: | 365 | case 3: |
| 366 | return error_notifier_event; | 366 | return error_notifier_event; |
| 367 | default: { | 367 | default: |
| 368 | LOG_CRITICAL(Service_NVDRV, "Unknown Ctrl GPU Event {}", event_id); | 368 | LOG_CRITICAL(Service_NVDRV, "Unknown Ctrl GPU Event {}", event_id); |
| 369 | return nullptr; | ||
| 369 | } | 370 | } |
| 370 | } | ||
| 371 | return nullptr; | ||
| 372 | } | 371 | } |
| 373 | 372 | ||
| 374 | } // namespace Service::Nvidia::Devices | 373 | } // namespace Service::Nvidia::Devices |
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 5ab41c0c4..0de67f1e1 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -228,6 +228,7 @@ Result ServiceFrameworkBase::HandleSyncRequest(Kernel::KServerSession& session, | |||
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | UNIMPLEMENTED_MSG("command_type={}", ctx.GetCommandType()); | 230 | UNIMPLEMENTED_MSG("command_type={}", ctx.GetCommandType()); |
| 231 | break; | ||
| 231 | } | 232 | } |
| 232 | 233 | ||
| 233 | // If emulation was shutdown, we are closing service threads, do not write the response back to | 234 | // If emulation was shutdown, we are closing service threads, do not write the response back to |
diff --git a/src/core/hle/service/time/time_zone_manager.cpp b/src/core/hle/service/time/time_zone_manager.cpp index 2aa675df9..f9ada7c93 100644 --- a/src/core/hle/service/time/time_zone_manager.cpp +++ b/src/core/hle/service/time/time_zone_manager.cpp | |||
| @@ -280,6 +280,7 @@ static constexpr int TransitionTime(int year, Rule rule, int offset) { | |||
| 280 | } | 280 | } |
| 281 | default: | 281 | default: |
| 282 | ASSERT(false); | 282 | ASSERT(false); |
| 283 | break; | ||
| 283 | } | 284 | } |
| 284 | return value + rule.transition_time + offset; | 285 | return value + rule.transition_time + offset; |
| 285 | } | 286 | } |