From 3686e03bb7aca834ab0bf7b844b9f770526e77ff Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 8 Oct 2022 18:27:05 +0200 Subject: [PATCH] Cast %p usage to void* Apparently, %p only accepts void*, and not any pointer type. Still better than casting a pointer to uint64_t. --- kernel/src/acpi/RSDT.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/src/acpi/RSDT.cpp b/kernel/src/acpi/RSDT.cpp index 5835cc5f..410644ba 100644 --- a/kernel/src/acpi/RSDT.cpp +++ b/kernel/src/acpi/RSDT.cpp @@ -30,7 +30,7 @@ ACPI::SDTHeader* ACPI::get_rsdt_or_xsdt() rsdt = (SDTHeader*)MemoryManager::get_unaligned_mappings(cache, rsdt_pages); } - kdbgln("Mapped RSDT/XSDT to virtual address %p, uses %ld pages", rsdt, rsdt_pages); + kdbgln("Mapped RSDT/XSDT to virtual address %p, uses %ld pages", (void*)rsdt, rsdt_pages); cache = rsdt; return rsdt; } @@ -59,7 +59,7 @@ void* ACPI::find_table(ACPI::SDTHeader* root_sdt, const char* signature) bool isXSDT = is_xsdt(); uint64_t entries = (root_sdt->Length - sizeof(SDTHeader)) / (isXSDT ? 8 : 4); kdbgln("Searching for table %s in the %s at %p (table contains %ld entries)", signature, isXSDT ? "XSDT" : "RSDT", - root_sdt, entries); + (void*)root_sdt, entries); for (uint64_t i = 0; i < entries; i++) { @@ -81,9 +81,9 @@ void* ACPI::find_table(ACPI::SDTHeader* root_sdt, const char* signature) kwarnln("Entry %ld in the %s points to null", i, isXSDT ? "XSDT" : "RSDT"); continue; } - kdbgln("Physical address of entry: %p", h); + kdbgln("Physical address of entry: %p", (void*)h); SDTHeader* realHeader = (SDTHeader*)MemoryManager::get_unaligned_mapping(h); - kdbgln("Mapped entry to virtual address %p", realHeader); + kdbgln("Mapped entry to virtual address %p", (void*)realHeader); if (!validate_sdt_header(realHeader)) { kwarnln("Header of entry %ld is not valid, skipping this entry", i);