Skip to content

Commit

Permalink
Merge #987: Fix unused parameter warnings when building without VERIFY
Browse files Browse the repository at this point in the history
189f6bc Fix unused parameter warnings when building without VERIFY (Jonas Nick)

Pull request description:

  This commit makes `./configure --enable-coverage && make check` free of warnings.

ACKs for top commit:
  practicalswift:
    cr ACK 189f6bc
  elichai:
    utACK 189f6bc
  siv2r:
    Tested ACK 189f6bc

Tree-SHA512: 727fe0e40ff61f404780b32dfa4102a58bed9d922e61bd17ddaaf1243b0c06edd9697ff4763b5e92d033e7db3778193bee07d85cfa3b9c46d45e5fec3f568009
  • Loading branch information
real-or-random committed Oct 12, 2021
2 parents da0092b + 189f6bc commit 10f9bd8
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 10f9bd8

Please sign in to comment.