misc: Fix warnings introduced in 65e5db3

This commit is contained in:
mintsuki 2024-07-29 18:54:28 +02:00
parent d4fed0c086
commit b8a30a8f85
2 changed files with 7 additions and 4 deletions

View File

@ -558,6 +558,10 @@ void *ext_mem_alloc_type_aligned(size_t count, uint32_t type, size_t alignment)
// Allocate memory top down.
void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignment, bool allow_high_allocs) {
#if !defined (__x86_64__) && !defined (__i386__)
(void)allow_high_allocs;
#endif
count = ALIGN_UP(count, alignment);
if (allocations_disallowed)
@ -572,9 +576,7 @@ void *ext_mem_alloc_type_aligned_mode(size_t count, uint32_t type, size_t alignm
#if defined(__x86_64__) || defined(__i386__)
// Let's make sure the entry is not > 4GiB
if (entry_top >= 0x100000000
&& !allow_high_allocs
) {
if (entry_top >= 0x100000000 && !allow_high_allocs) {
entry_top = 0x100000000;
if (entry_base >= entry_top)
continue;

View File

@ -13,7 +13,8 @@ local_gdt:
local_gdt_ptr:
dw local_gdt.top - local_gdt - 1
dq local_gdt
dd local_gdt
dd 0
old_gdt_ptr:
dw 0