Skip to content

Commit

Permalink
Fix "unused variable" compiler warning (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm authored Apr 13, 2022
1 parent 68f28f8 commit fb1fcb6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions tests/memtrace_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,12 @@ static int s_test_memtrace_none(struct aws_allocator *allocator, void *ctx) {
struct aws_allocator *tracer = aws_mem_tracer_new(allocator, NULL, AWS_MEMTRACE_NONE, 0);

void *allocs[NUM_ALLOCS] = {0};
size_t total = 0;

for (size_t idx = 0; idx < AWS_ARRAY_SIZE(allocs); ++idx) {
uint32_t size = 0;
aws_device_random_u32(&size);
size = (size % 1024) + 1; /* not necessary to allocate a gajillion bytes */
allocs[idx] = aws_mem_acquire(tracer, size);
total += size;
}

ASSERT_UINT_EQUALS(0, aws_mem_tracer_bytes(tracer));
Expand Down

0 comments on commit fb1fcb6

Please sign in to comment.