ams: use R_DISCARD everywhere

This commit is contained in:
hexkyz committed 2026-09-23 20:42:15 +01:00
1 parent 2d0fc65fd8
commit 44d9649c6d
65 files changed
+185 -185

No files matched your search

@@ -89,8 +89,8 @@ namespace ams::pm::impl {
if (m_handle != os::InvalidNativeHandle) {
/* Unregister the process. */
fsprUnregisterProgram(m_process_id.value);
sm::manager::UnregisterProcess(m_process_id);
ldr::pm::UnpinProgram(m_pin_id);
R_DISCARD(sm::manager::UnregisterProcess(m_process_id));
R_DISCARD(ldr::pm::UnpinProgram(m_pin_id));
/* Close the process's handle. */
os::CloseNativeHandle(m_handle);
@@ -142,7 +142,7 @@ namespace ams::pm::impl {
R_TRY(ldr::pm::AtmospherePinProgram(std::addressof(pin_id), fixed_location, override_status));
/* If we fail after now, unpin. */
ON_RESULT_FAILURE { ldr::pm::UnpinProgram(pin_id); };
ON_RESULT_FAILURE { R_DISCARD(ldr::pm::UnpinProgram(pin_id)); };
/* Ensure we can talk to mitm services. */
{
@@ -486,7 +486,7 @@ namespace ams::pm::impl {
/* NOTE: Nintendo does not check the result of this. */
if (spl::IsDisabledProgramVerification()) {
if (hos::GetVersion() >= hos::Version_10_0_0) {
ldr::pm::SetEnabledProgramVerification(false);
R_DISCARD(ldr::pm::SetEnabledProgramVerification(false));
} else {
fsprSetEnabledProgramVerification(false);
}
@@ -94,7 +94,7 @@ namespace ams::pm::impl {
auto list = GetProcessList();
/* Reset the process's signal. */
svc::ResetSignal(process_info->GetHandle());
R_DISCARD(svc::ResetSignal(process_info->GetHandle()));
/* Update the process's state. */
const svc::ProcessState old_state = process_info->GetState();