Skip to content

Commit

Permalink
Fix unused parameter warnings when building without VERIFY
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasnick committed Oct 4, 2021
1 parent da0092b commit 189f6bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ static SECP256K1_INLINE void *manual_alloc(void** prealloc_ptr, size_t alloc_siz
VERIFY_CHECK((unsigned char*)*prealloc_ptr >= (unsigned char*)base);
VERIFY_CHECK(((unsigned char*)*prealloc_ptr - (unsigned char*)base) % ALIGNMENT == 0);
VERIFY_CHECK((unsigned char*)*prealloc_ptr - (unsigned char*)base + aligned_alloc_size <= max_size);
/* Avoid unused parameter warnings when building without VERIFY */
(void) base; (void) max_size;
ret = *prealloc_ptr;
*prealloc_ptr = (unsigned char*)*prealloc_ptr + aligned_alloc_size;
return ret;
Expand Down

0 comments on commit 189f6bc

Please sign in to comment.