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 <axelheider@gmx.de>
  • Loading branch information
axel-h committed Jan 12, 2024
1 parent dd50eed commit 8487d57
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 8487d57

Please sign in to comment.