The new IS_ENABLED macro allows exposing conditionally enabled code always to the compiler, even though it may not ultimately end up being built. This is in particular useful for letting the compiler catch any logging format string errors. Introduce a new BT_DBG_ENABLED macro that c-files need to define before including <bluetooth/log.h> in order to choose whether BT_DBG() logs are enabled or not. When no Bluetooth logs are enabled the patch also modifies the log macros to have the format strings checked with the help of the __printf_like annotation and empty static inline functions. Change-Id: Ie6bc8e10727b5b306f3ed0f94089a07a22583d9b Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> |
||
|---|---|---|
| .. | ||
| hal | ||
| hci | ||
| ll | ||
| ticker | ||
| util | ||
| Kconfig | ||
| Makefile | ||