Skip to content

Commit 854e011

Browse files
Fix some small string formatting bugs
* Format error Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Format error fix Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 3b5f3b2 commit 854e011

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/alloc/SlabAllocator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ SlabAllocator::~SlabAllocator() {
333333
freeBlocks += countSetBits(chunk->freeBlocks[i]);
334334
int allocatedBlocks = chunk->numBlocks - freeBlocks;
335335
if (allocatedBlocks > 0)
336-
dprintf(2, " Chunk %i: %i blocks of size %i\n", chunkId, allocatedBlocks, chunk->blockWidth);
336+
dprintf(2, " Chunk %i: %i blocks of size %lu\n", chunkId, allocatedBlocks, chunk->blockWidth);
337337
}
338338
::free(chunk->blocks);
339339
#ifndef DEBUG_MEMORY

src/strutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ char* formatBinaryDataForHexdump(const uint8_t* data, int size, int columns) {
4747

4848
for (int line = 0; line < nLines; line++) {
4949
if (nLines > 1)
50-
p += sprintf(p, "%04x ", dp - data);
50+
p += sprintf(p, "%04zx ", (size_t)(dp - data));
5151

5252
if (line + 1 == nLines)
5353
columns = size - columns * line;

0 commit comments

Comments
 (0)