aboutsummaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorjbranso@dismail.de <jbranso@dismail.de>2024-10-20 15:07:42 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-10-21 00:34:10 +0200
commit7d935dedcb960f09986795d1245cb574fa2ca995 (patch)
treef81e9d9de0b411984b53cc1507ae70cfc1348500 /kern
parent257e2f8c3b4dc4175ea5f093bf59e076107a0ef8 (diff)
downloadgnumach-7d935dedcb960f09986795d1245cb574fa2ca995.tar.gz
gnumach-7d935dedcb960f09986795d1245cb574fa2ca995.tar.bz2
gnumach-7d935dedcb960f09986795d1245cb574fa2ca995.zip
fix a compiler warning.
* kern/slab.c(kalloc_init): %lu -> %zu kern/slab.c: In function 'kalloc_init': kern/slab.c:1349:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 1349 | sprintf(name, "kalloc_%lu", size); | ~~^ ~~~~ | | | | | size_t {aka unsigned int} | long unsigned int | %u Message-ID: <20241020190744.2522-2-jbranso@dismail.de>
Diffstat (limited to 'kern')
-rw-r--r--kern/slab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/slab.c b/kern/slab.c
index dc44e42b..b20dd26f 100644
--- a/kern/slab.c
+++ b/kern/slab.c
@@ -1346,7 +1346,7 @@ void kalloc_init(void)
size = 1 << KALLOC_FIRST_SHIFT;
for (i = 0; i < ARRAY_SIZE(kalloc_caches); i++) {
- sprintf(name, "kalloc_%lu", size);
+ sprintf(name, "kalloc_%lu", (unsigned long) size);
kmem_cache_init(&kalloc_caches[i], name, size, 0, NULL, 0);
size <<= 1;
}