Skip to content

Commit 629aaaa

Browse files
committed
squash! mem_pool: add GIT_TRACE_MEMPOOL support
b358145 (mem_pool: add GIT_TRACE_MEMPOOL support, 2018-10-04) adds a format that uses %p format identifiers which are meant to be used by (void *) which will be reported under pedantic, as it was not explicitly cast. add cast and while at it, reformat the affected lines so they fit better under the 80 column limit. Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]>
1 parent d9c437e commit 629aaaa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

mem-pool.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,19 @@ void mem_pool_init(struct mem_pool *pool, size_t initial_size)
4444
if (initial_size > 0)
4545
mem_pool_alloc_block(pool, initial_size, NULL);
4646

47-
trace_printf_key(&trace_mem_pool, "mem_pool (%p): init (%"PRIuMAX") initial size\n",
48-
pool, (uintmax_t)initial_size);
47+
trace_printf_key(&trace_mem_pool,
48+
"mem_pool (%p): init (%"PRIuMAX") initial size\n",
49+
(void *)pool, (uintmax_t)initial_size);
4950
}
5051

5152
void mem_pool_discard(struct mem_pool *pool, int invalidate_memory)
5253
{
5354
struct mp_block *block, *block_to_free;
5455

55-
trace_printf_key(&trace_mem_pool, "mem_pool (%p): discard (%"PRIuMAX") unused\n",
56-
pool, (uintmax_t)(pool->mp_block->end - pool->mp_block->next_free));
56+
trace_printf_key(&trace_mem_pool,
57+
"mem_pool (%p): discard (%"PRIuMAX") unused\n",
58+
(void *)pool,
59+
(uintmax_t)(pool->mp_block->end - pool->mp_block->next_free));
5760
block = pool->mp_block;
5861
while (block)
5962
{

0 commit comments

Comments
 (0)