Repository navigation
Commit 13fbfcc
committed
mem: fix -Werror=format build failure in hg_arena_init()
HG_CELL_HDR is built from ROUNDTO (sizeof-derived), so it has type
size_t, not int. Printing it with %d tripped -Wformat and, since the
build runs with -Werror, aborted the whole compile at mem/hg_arena.o.
Use %zu, matching how f_malloc.c, q_malloc.c and hp_malloc.c already
print their sizeof-derived values. %zu is also correct on 32-bit, where
ROUNDTO is sizeof(void *).1 parent ee79e66 commit 13fbfcc
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
0 commit comments