From fae8fa47b2e9eb8ab69c54e11bc2d0f656a162ce Mon Sep 17 00:00:00 2001 From: Matheus Date: Sat, 4 Feb 2023 00:25:20 -0300 Subject: [PATCH] pci: fix warnings on header --- src/arch/x86_64/include/arch/pci.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arch/x86_64/include/arch/pci.h b/src/arch/x86_64/include/arch/pci.h index 9c708d6a..dff3fa54 100644 --- a/src/arch/x86_64/include/arch/pci.h +++ b/src/arch/x86_64/include/arch/pci.h @@ -65,7 +65,7 @@ typedef struct _pci_enumeration{ msixmsg_t* table; int entrycount; } msix; - } + }; } pci_enumeration; @@ -95,9 +95,9 @@ static inline void* getbarmemaddr(pci_deviceheader* e, int bar){ return NULL; if(type & PCI_MEM_64) - return (e->BAR[bar] & ~(0xF)) + ((uint64_t)e->BAR[bar + 1] << 32); + return (void*)(((uint64_t)e->BAR[bar] & ~(0xF)) + ((uint64_t)e->BAR[bar + 1] << 32)); else - return e->BAR[bar] & ~(0xF); + return (void*)((uint64_t)e->BAR[bar] & ~(0xF)); } #define PCI_COMMAND_IO 1