kern: fix warn-errors

This commit is contained in:
Michael Scire 2020-08-20 17:29:10 -07:00 committed by SciresM
parent bb1cdd8c87
commit bb11c57e7d
14 changed files with 25 additions and 12 deletions

View file

@ -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;

View file

@ -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; }

View file

@ -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);

View file

@ -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; }
};

View file

@ -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; }

View file

@ -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; }

View file

@ -197,6 +197,7 @@ namespace ams::kern {
.perm = static_cast<ams::svc::MemoryPermission>(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);

View file

@ -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();

View file

@ -359,6 +359,8 @@ namespace ams::kern {
static Result GetProcessList(s32 *out_num_processes, ams::kern::svc::KUserPointer<u64 *> 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;

View file

@ -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;

View file

@ -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; }

View file

@ -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);

View file

@ -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; }

View file

@ -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();