Skip to content

Commit

Permalink
libsel4allocman: fix clang warnings for printing
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Nov 24, 2023
1 parent 9165430 commit 1da7c9c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libsel4allocman/src/allocman.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ int allocman_configure_utspace_reserve(allocman_t *alloc, struct allocman_utspac
* icnreasing reservations, but I cannot see the use case for that */
for (i = 0; i < alloc->num_utspace_chunks; i++) {
if (alloc->utspace_chunk[i].size_bits == chunk.size_bits && alloc->utspace_chunk[i].type == chunk.type) {
ZF_LOGE("Failed to set reserve for {type: %d size_bits: %d} as one already exists.", chunk.type, chunk.size_bits);
ZF_LOGE("Failed to set reserve for {type: %"SEL4_PRIu_word" size_bits: %zu} as one already exists.",
chunk.type, chunk.size_bits);
ZF_LOGE("Ignoring this could cause the allocator to break in hard-to-identify ways.");
error = 1;
goto exit;
Expand Down Expand Up @@ -620,7 +621,7 @@ int allocman_configure_mspace_reserve(allocman_t *alloc, struct allocman_mspace_
* icnreasing reservations, but I cannot see the use case for that */
for (i = 0; i < alloc->num_mspace_chunks; i++) {
if (alloc->mspace_chunk[i].size == chunk.size) {
ZF_LOGE("Failed to set reserve for {size: %d} as one already exists.", chunk.size);
ZF_LOGE("Failed to set reserve for {size: %zu} as one already exists.", chunk.size);
ZF_LOGE("Ignoring this could cause the allocator to break in hard-to-identify ways.");
error = 1;
goto exit;
Expand Down

0 comments on commit 1da7c9c

Please sign in to comment.