Merge bitcoin-core/secp256k1#987: Fix unused parameter warnings when building without VERIFY
189f6bcfef
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 ACK189f6bcfef
elichai: utACK189f6bcfef
siv2r: Tested ACK189f6bc
Tree-SHA512: 727fe0e40ff61f404780b32dfa4102a58bed9d922e61bd17ddaaf1243b0c06edd9697ff4763b5e92d033e7db3778193bee07d85cfa3b9c46d45e5fec3f568009
This commit is contained in:
commit
10f9bd84f4
|
@ -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);
|
||||||
VERIFY_CHECK(((unsigned char*)*prealloc_ptr - (unsigned char*)base) % ALIGNMENT == 0);
|
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);
|
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;
|
ret = *prealloc_ptr;
|
||||||
*prealloc_ptr = (unsigned char*)*prealloc_ptr + aligned_alloc_size;
|
*prealloc_ptr = (unsigned char*)*prealloc_ptr + aligned_alloc_size;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue