kern: build with -Wextra

This commit is contained in:
Michael Scire
2020-08-17 14:20:24 -07:00
parent d3014f6ed9
commit 73798cb812
32 changed files with 100 additions and 30 deletions

View File

@@ -37,6 +37,7 @@ namespace ams::kern::arch::arm64::cpu {
constexpr KThreadTerminationInterruptHandler() : KInterruptHandler() { /* ... */ }
virtual KInterruptTask *OnInterrupt(s32 interrupt_id) override {
MESOSPHERE_UNUSED(interrupt_id);
return nullptr;
}
};
@@ -68,6 +69,8 @@ namespace ams::kern::arch::arm64::cpu {
/* Nintendo misuses this per their own API, but it's functional. */
virtual KInterruptTask *OnInterrupt(s32 interrupt_id) override {
MESOSPHERE_UNUSED(interrupt_id);
if (this->which < 0) {
this->counter = cpu::GetCycleCounter();
} else {
@@ -145,6 +148,7 @@ namespace ams::kern::arch::arm64::cpu {
}
virtual KInterruptTask *OnInterrupt(s32 interrupt_id) override {
MESOSPHERE_UNUSED(interrupt_id);
this->ProcessOperation();
return nullptr;
}

View File

@@ -24,6 +24,7 @@ namespace ams::kern::arch::arm64 {
constexpr KHardwareTimerInterruptTask() : KInterruptTask() { /* ... */ }
virtual KInterruptTask *OnInterrupt(s32 interrupt_id) override {
MESOSPHERE_UNUSED(interrupt_id);
return this;
}

View File

@@ -160,6 +160,7 @@ namespace ams::kern::arch::arm64 {
void KPageTable::Initialize(s32 core_id) {
/* Nothing actually needed here. */
MESOSPHERE_UNUSED(core_id);
}
Result KPageTable::InitializeForKernel(void *table, KVirtualAddress start, KVirtualAddress end) {
@@ -181,7 +182,8 @@ namespace ams::kern::arch::arm64 {
}
Result KPageTable::InitializeForProcess(u32 id, ams::svc::CreateProcessFlag as_type, bool enable_aslr, bool from_back, KMemoryManager::Pool pool, KProcessAddress code_address, size_t code_size, KMemoryBlockSlabManager *mem_block_slab_manager, KBlockInfoManager *block_info_manager, KPageTableManager *pt_manager) {
/* Convert the address space type to a width. */
/* The input ID isn't actually used. */
MESOSPHERE_UNUSED(id);
/* Get an ASID */
this->asid = g_asid_manager.Reserve();
@@ -364,6 +366,9 @@ namespace ams::kern::arch::arm64 {
MESOSPHERE_ASSERT(util::IsAligned(GetInteger(phys_addr), L1BlockSize));
MESOSPHERE_ASSERT(util::IsAligned(num_pages * PageSize, L1BlockSize));
/* Allocation is never needed for L1 block mapping. */
MESOSPHERE_UNUSED(page_list, reuse_ll);
auto &impl = this->GetImpl();
/* Iterate, mapping each block. */

View File

@@ -281,6 +281,7 @@ namespace ams::kern::arch::arm64 {
}
void KThreadContext::OnThreadTerminating(const KThread *thread) {
MESOSPHERE_UNUSED(thread);
/* ... */
}