libctf: don't warn about unused fp in ctf_assert

When hash debugging is enabled and NDEBUG is not set, ctf_assert()
translates into a true assert().  Don't leave the fp parameter
unused in this case (which can cause compiler errors when -Werror
is also on).
This commit is contained in:
Nick Alcock
2025-04-24 13:46:08 +01:00
parent 3ae061cfb0
commit ab3ad58be9

View File

@@ -87,7 +87,7 @@ extern "C"
#if defined (ENABLE_LIBCTF_HASH_DEBUGGING) && !defined (NDEBUG)
#include <assert.h>
#define ctf_assert(fp, expr) (assert (expr), 1)
#define ctf_assert(fp, expr) (assert (expr), fp || 1)
#else
#define ctf_assert(fp, expr) \
_libctf_unlikely_ (ctf_assert_internal (fp, __FILE__, __LINE__, \