# HG changeset patch # User Mike Becker # Date 1761490015 -3600 # Node ID b9a384b1226e94efab400622b4e5dd645f5b9ddd # Parent 09a73312d5ec113da47bdea6c067ae829782e287 fix warnings on certain compilers due to implicit cast from fptr to bool diff -r 09a73312d5ec -r b9a384b1226e src/mempool.c --- a/src/mempool.c Sun Oct 26 13:08:42 2025 +0100 +++ b/src/mempool.c Sun Oct 26 15:46:55 2025 +0100 @@ -179,17 +179,15 @@ } static void cx_mempool_free_all_simple(const struct cx_mempool_s *pool) { - const bool has_destr = pool->destr; - const bool has_destr2 = pool->destr2; for (size_t i = 0; i < pool->size; i++) { struct cx_mempool_memory_s *mem = pool->data[i]; if (mem->destructor) { mem->destructor(mem->c); } - if (has_destr) { + if (pool->destr != NULL) { pool->destr(mem->c); } - if (has_destr2) { + if (pool->destr2 != NULL) { pool->destr2(pool->destr2_data, mem->c); } cxFree(pool->base_allocator, mem);