btstack_debug: avoid unused warnings with NDEBUG

This commit is contained in:
Matthias Ringwald 2024-12-05 15:33:05 +01:00
parent c1b6583a19
commit ad2dfd72d7

View File

@ -72,7 +72,11 @@ extern "C" {
// allow to override btstack_assert in btstack_config.h
#ifndef btstack_assert
// map to libc assert
#ifdef NDEBUG
#define btstack_assert(condition) {(void)(condition);}
#else
#define btstack_assert(condition) assert(condition)
#endif
#endif /* btstack_assert */
#else /* HAVE_ASSERT */
#ifdef ENABLE_BTSTACK_ASSERT