diff --git a/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_debug.hpp b/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_debug.hpp index f06acd990..b9735db84 100644 --- a/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_debug.hpp +++ b/libraries/libmesosphere/include/mesosphere/arch/arm64/kern_k_debug.hpp @@ -33,7 +33,7 @@ namespace ams::kern::arch::arm64 { explicit KDebug() { /* ... */ } virtual ~KDebug() { /* ... */ } - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } public: virtual Result GetThreadContextImpl(ams::svc::ThreadContext *out, KThread *thread, u32 context_flags) override; virtual Result SetThreadContextImpl(const ams::svc::ThreadContext &ctx, KThread *thread, u32 context_flags) override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_code_memory.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_code_memory.hpp index 29467b701..8fcbe4a17 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_code_memory.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_code_memory.hpp @@ -46,7 +46,7 @@ namespace ams::kern { Result UnmapFromOwner(KProcessAddress address, size_t size); virtual bool IsInitialized() const override { return this->is_initialized; } - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } KProcess *GetOwner() const { return this->owner; } KProcessAddress GetSourceAddress() { return this->address; } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_device_address_space.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_device_address_space.hpp index 03b302f9a..42e72a71e 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_device_address_space.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_device_address_space.hpp @@ -37,7 +37,7 @@ namespace ams::kern { virtual void Finalize() override; virtual bool IsInitialized() const override { return this->is_initialized; } - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } Result Attach(ams::svc::DeviceName device_name); Result Detach(ams::svc::DeviceName device_name); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_interrupt_event.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_interrupt_event.hpp index 326994b10..5231f805f 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_interrupt_event.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_interrupt_event.hpp @@ -41,7 +41,7 @@ namespace ams::kern { virtual bool IsInitialized() const override { return this->is_initialized; } - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } constexpr s32 GetInterruptId() const { return this->interrupt_id; } }; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_light_client_session.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_light_client_session.hpp index f8c429bce..93eb7ae77 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_light_client_session.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_light_client_session.hpp @@ -35,7 +35,7 @@ namespace ams::kern { } virtual void Destroy() override; - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } constexpr const KLightSession *GetParent() const { return this->parent; } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_light_server_session.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_light_server_session.hpp index 1487a714d..7dd58c031 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_light_server_session.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_light_server_session.hpp @@ -41,7 +41,7 @@ namespace ams::kern { } virtual void Destroy() override; - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } constexpr const KLightSession *GetParent() const { return this->parent; } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_memory_block.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_memory_block.hpp index b5f4dbd3f..09a761db1 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_memory_block.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_memory_block.hpp @@ -197,6 +197,7 @@ namespace ams::kern { .perm = static_cast(this->perm & KMemoryPermission_UserMask), .ipc_refcount = this->ipc_lock_count, .device_refcount = this->device_use_count, + .padding = {}, }; } @@ -396,6 +397,9 @@ namespace ams::kern { } constexpr void ShareToDevice(KMemoryPermission new_perm) { + /* New permission isn't used. */ + MESOSPHERE_UNUSED(new_perm); + /* We must either be shared or have a zero lock count. */ MESOSPHERE_ASSERT((this->attribute & KMemoryAttribute_DeviceShared) == KMemoryAttribute_DeviceShared || this->device_use_count == 0); @@ -407,6 +411,9 @@ namespace ams::kern { } constexpr void UnshareToDevice(KMemoryPermission new_perm) { + /* New permission isn't used. */ + MESOSPHERE_UNUSED(new_perm); + /* We must be shared. */ MESOSPHERE_ASSERT((this->attribute & KMemoryAttribute_DeviceShared) == KMemoryAttribute_DeviceShared); @@ -439,6 +446,9 @@ namespace ams::kern { } constexpr void UnlockForIpc(KMemoryPermission new_perm) { + /* New permission isn't used. */ + MESOSPHERE_UNUSED(new_perm); + /* We must be locked. */ MESOSPHERE_ASSERT((this->attribute & KMemoryAttribute_IpcLocked) == KMemoryAttribute_IpcLocked); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_port.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_port.hpp index 36406d405..1c7d5da02 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_port.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_port.hpp @@ -44,7 +44,7 @@ namespace ams::kern { constexpr KPort() : server(), client(), name(), state(State::Invalid), is_light() { /* ... */ } virtual ~KPort() { /* ... */ } - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } void Initialize(s32 max_sessions, bool is_light, uintptr_t name); void OnClientClosed(); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp index 4e74fe728..8eb427e19 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_process.hpp @@ -359,6 +359,8 @@ namespace ams::kern { static Result GetProcessList(s32 *out_num_processes, ams::kern::svc::KUserPointer out_process_ids, s32 max_out_count); static void Switch(KProcess *cur_process, KProcess *next_process) { + MESOSPHERE_UNUSED(cur_process); + /* Set the current process pointer. */ SetCurrentProcess(next_process); @@ -373,7 +375,7 @@ namespace ams::kern { /* Overridden parent functions. */ virtual bool IsInitialized() const override { return this->is_initialized; } - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_resource_limit.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_resource_limit.hpp index bfcfcb4fb..286992183 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_resource_limit.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_resource_limit.hpp @@ -35,7 +35,7 @@ namespace ams::kern { constexpr ALWAYS_INLINE KResourceLimit() : limit_values(), current_values(), current_hints(), lock(), waiter_count(), cond_var() { /* ... */ } virtual ~KResourceLimit() { /* ... */ } - static ALWAYS_INLINE void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } void Initialize(); virtual void Finalize() override; diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_session_request.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_session_request.hpp index 03f1d6ef6..4d5e232d1 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_session_request.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_session_request.hpp @@ -174,7 +174,7 @@ namespace ams::kern { } } - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } constexpr KThread *GetThread() const { return this->thread; } constexpr KWritableEvent *GetEvent() const { return this->event; } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_shared_memory.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_shared_memory.hpp index 82fb2432e..9bbd33a83 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_shared_memory.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_shared_memory.hpp @@ -47,7 +47,7 @@ namespace ams::kern { virtual void Finalize() override; virtual bool IsInitialized() const override { return this->is_initialized; } - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } Result Map(KProcessPageTable *table, KProcessAddress address, size_t size, KProcess *process, ams::svc::MemoryPermission map_perm); Result Unmap(KProcessPageTable *table, KProcessAddress address, size_t size, KProcess *process); diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_thread.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_thread.hpp index bd959c2e7..a7f36f95b 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_thread.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_thread.hpp @@ -472,6 +472,7 @@ namespace ams::kern { void AddCpuTime(s32 core_id, s64 amount) { this->cpu_time += amount; /* TODO: Debug kernels track per-core tick counts. Should we? */ + MESOSPHERE_UNUSED(core_id); } s64 GetCpuTime() const { return this->cpu_time; } diff --git a/libraries/libmesosphere/include/mesosphere/kern_k_writable_event.hpp b/libraries/libmesosphere/include/mesosphere/kern_k_writable_event.hpp index f67c43979..f3ee813d6 100644 --- a/libraries/libmesosphere/include/mesosphere/kern_k_writable_event.hpp +++ b/libraries/libmesosphere/include/mesosphere/kern_k_writable_event.hpp @@ -32,7 +32,7 @@ namespace ams::kern { virtual void Destroy() override; - static void PostDestroy(uintptr_t arg) { /* ... */ } + static void PostDestroy(uintptr_t arg) { MESOSPHERE_UNUSED(arg); /* ... */ } void Initialize(KEvent *p); Result Signal();