From 257e2f8c3b4dc4175ea5f093bf59e076107a0ef8 Mon Sep 17 00:00:00 2001 From: "jbranso@dismail.de" Date: Sun, 20 Oct 2024 15:07:41 -0400 Subject: fix a compile warning. * vm/vm_page.c(vm_page_setup): %lu -> %zu vm/vm_page.c: In function 'vm_page_setup': vm/vm_page.c:1425:41: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 1425 | printf("vm_page: page table size: %lu entries (%luk)\n", nr_pages, | ~~^ ~~~~~~~~ | | | | long unsigned int size_t {aka unsigned int} | %u vm/vm_page.c:1425:54: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 1425 | printf("vm_page: page table size: %lu entries (%luk)\n", nr_pages, | ~~^ | | | long unsigned int | %u 1426 | table_size >> 10); | ~~~~~~~~~~~~~~~~ | | | size_t {aka unsigned int} Message-ID: <20241020190744.2522-1-jbranso@dismail.de> --- vm/vm_page.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vm/vm_page.c b/vm/vm_page.c index 04decbbd..286fe62f 100644 --- a/vm/vm_page.c +++ b/vm/vm_page.c @@ -1422,8 +1422,9 @@ vm_page_setup(void) nr_pages += vm_page_atop(vm_page_boot_seg_size(&vm_page_boot_segs[i])); table_size = vm_page_round(nr_pages * sizeof(struct vm_page)); - printf("vm_page: page table size: %lu entries (%luk)\n", nr_pages, - table_size >> 10); + printf("vm_page: page table size: %lu entries (%luk)\n", + (unsigned long) nr_pages, + (unsigned long) (table_size >> 10)); table = (struct vm_page *)pmap_steal_memory(table_size); va = (unsigned long)table; -- cgit v1.2.3