mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-02 07:20:16 +00:00
btstack_debug: avoid unused warnings with NDEBUG
This commit is contained in:
parent
c1b6583a19
commit
ad2dfd72d7
@ -72,7 +72,11 @@ extern "C" {
|
|||||||
// allow to override btstack_assert in btstack_config.h
|
// allow to override btstack_assert in btstack_config.h
|
||||||
#ifndef btstack_assert
|
#ifndef btstack_assert
|
||||||
// map to libc assert
|
// map to libc assert
|
||||||
|
#ifdef NDEBUG
|
||||||
|
#define btstack_assert(condition) {(void)(condition);}
|
||||||
|
#else
|
||||||
#define btstack_assert(condition) assert(condition)
|
#define btstack_assert(condition) assert(condition)
|
||||||
|
#endif
|
||||||
#endif /* btstack_assert */
|
#endif /* btstack_assert */
|
||||||
#else /* HAVE_ASSERT */
|
#else /* HAVE_ASSERT */
|
||||||
#ifdef ENABLE_BTSTACK_ASSERT
|
#ifdef ENABLE_BTSTACK_ASSERT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user