From 55f63d26fa54e6185b5bb2e905bcfdc007f7520a Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 27 Oct 2022 03:37:35 +0300 Subject: [PATCH] Revert and ignore the compiler warning --- .../cpu/AdvancedProgrammableInterruptController.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Architecture/amd64/cpu/AdvancedProgrammableInterruptController.cpp b/Architecture/amd64/cpu/AdvancedProgrammableInterruptController.cpp index 4b01052..c2700a3 100644 --- a/Architecture/amd64/cpu/AdvancedProgrammableInterruptController.cpp +++ b/Architecture/amd64/cpu/AdvancedProgrammableInterruptController.cpp @@ -14,6 +14,14 @@ NewLock(APICLock); using namespace CPU::x64; +/* +In constructor ‘APIC::APIC::APIC(int)’: +warning: left shift count >= width of type +| APICBaseAddress = BaseStruct.ApicBaseLo << 12u | BaseStruct.ApicBaseHi << 32u; +| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~ +*/ +#pragma GCC diagnostic ignored "-Wshift-count-overflow" + namespace APIC { // headache @@ -219,7 +227,7 @@ namespace APIC { SmartCriticalSection(APICLock); APIC_BASE BaseStruct = {.raw = rdmsr(MSR_APIC_BASE)}; - APICBaseAddress = BaseStruct.ApicBaseLo << 12u | (unsigned long)BaseStruct.ApicBaseHi << 32u; + APICBaseAddress = BaseStruct.ApicBaseLo << 12u | BaseStruct.ApicBaseHi << 32u; trace("APIC Address: %#lx", APICBaseAddress); uint32_t rcx;