Lightrec plugin: Fix warnings about printf formats
authorPaul Cercueil <paul@crapouillou.net>
Fri, 17 May 2024 11:30:10 +0000 (13:30 +0200)
committerPaul Cercueil <paul@crapouillou.net>
Fri, 17 May 2024 17:33:50 +0000 (19:33 +0200)
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
libpcsxcore/lightrec/mem.c

index 9134d89..5cd86b4 100644 (file)
@@ -8,6 +8,7 @@
 #endif
 #include <errno.h>
 #include <fcntl.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -50,13 +51,15 @@ static void * mmap_huge(void *addr, size_t length, int prot, int flags,
                           flags | MAP_HUGETLB | (21 << MAP_HUGE_SHIFT),
                           fd, offset);
                if (map != MAP_FAILED)
-                       printf("Hugetlb mmap to address 0x%lx succeeded\n", (uintptr_t) addr);
+                       printf("Hugetlb mmap to address 0x%" PRIxPTR " succeeded\n",
+                              (uintptr_t) addr);
        }
 
        if (map == MAP_FAILED) {
                map = mmap(addr, length, prot, flags, fd, offset);
                if (map != MAP_FAILED) {
-                       printf("Regular mmap to address 0x%lx succeeded\n", (uintptr_t) addr);
+                       printf("Regular mmap to address 0x%" PRIxPTR " succeeded\n",
+                              (uintptr_t) addr);
 #ifdef MADV_HUGEPAGE
                        madvise(map, length, MADV_HUGEPAGE);
 #endif