Fixed compiler warnings

This commit is contained in:
Alex 2022-10-27 03:23:47 +03:00
parent 8fd53ea9b2
commit 305168a593
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 4 additions and 4 deletions

View File

@ -219,7 +219,7 @@ namespace APIC
{ {
SmartCriticalSection(APICLock); SmartCriticalSection(APICLock);
APIC_BASE BaseStruct = {.raw = rdmsr(MSR_APIC_BASE)}; APIC_BASE BaseStruct = {.raw = rdmsr(MSR_APIC_BASE)};
APICBaseAddress = BaseStruct.ApicBaseLo << 12u | BaseStruct.ApicBaseHi << 32u; APICBaseAddress = BaseStruct.ApicBaseLo << 12u | (unsigned long)BaseStruct.ApicBaseHi << 32u;
trace("APIC Address: %#lx", APICBaseAddress); trace("APIC Address: %#lx", APICBaseAddress);
uint32_t rcx; uint32_t rcx;

View File

@ -40,13 +40,13 @@ public:
HashNode<K, V> *tmp = new HashNode<K, V>(Key, Value); HashNode<K, V> *tmp = new HashNode<K, V>(Key, Value);
int Index = HashCode(Key); int Index = HashCode(Key);
while (Nodes[Index] != nullptr && Nodes[Index]->Key != Key && Nodes[Index]->Key != -1) while (Nodes[Index] != nullptr && Nodes[Index]->Key != Key && Nodes[Index]->Key != (K)-1)
{ {
Index++; Index++;
Index %= HashMapCapacity; Index %= HashMapCapacity;
} }
if (Nodes[Index] == nullptr || Nodes[Index]->Key == -1) if (Nodes[Index] == nullptr || Nodes[Index]->Key == (K)-1)
HashMapSize++; HashMapSize++;
Nodes[Index] = tmp; Nodes[Index] = tmp;
} }
@ -80,7 +80,7 @@ public:
if (Iterate++ > HashMapCapacity) if (Iterate++ > HashMapCapacity)
return 0xdeadbeef; return 0xdeadbeef;
if (Nodes[Index]->Key == Key) if (Nodes[Index]->Key == (K)Key)
return Nodes[Index]->Value; return Nodes[Index]->Value;
Index++; Index++;
Index %= HashMapCapacity; Index %= HashMapCapacity;