Skip to content

Commit

Permalink
#1182 Fix warnings when FLECS_USE_OS_ALLOC.
Browse files Browse the repository at this point in the history
When using the OS allocator, `flecs_balloc_block()` is unused and
can be removed. Also, the `src` parameter to `flecs_brealloc()`
is not used.
  • Loading branch information
waywardmonkeys committed Apr 10, 2024
1 parent 4388b52 commit f0f3898
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -39070,6 +39070,7 @@ void flecs_bitset_swap(
int64_t ecs_block_allocator_alloc_count = 0;
int64_t ecs_block_allocator_free_count = 0;

#ifndef FLECS_USE_OS_ALLOC
static
ecs_block_allocator_chunk_header_t* flecs_balloc_block(
ecs_block_allocator_t *allocator)
Expand Down Expand Up @@ -39108,6 +39109,7 @@ ecs_block_allocator_chunk_header_t* flecs_balloc_block(
chunk->next = NULL;
return first_chunk;
}
#endif

void flecs_ballocator_init(
ecs_block_allocator_t *ba,
Expand Down Expand Up @@ -39249,6 +39251,7 @@ void* flecs_brealloc(
{
void *result;
#ifdef FLECS_USE_OS_ALLOC
(void)src;
result = ecs_os_realloc(memory, dst->data_size);
#else
if (dst == src) {
Expand Down

0 comments on commit f0f3898

Please sign in to comment.