diff --git a/components/bt/host/bluedroid/btc/core/btc_dm.c b/components/bt/host/bluedroid/btc/core/btc_dm.c index 1f9c7619595..754745be95c 100644 --- a/components/bt/host/bluedroid/btc/core/btc_dm.c +++ b/components/bt/host/bluedroid/btc/core/btc_dm.c @@ -342,7 +342,7 @@ static void btc_dm_auth_cmpl_evt (tBTA_DM_AUTH_CMPL *p_auth_cmpl) ) #endif if (1) { - bt_status_t ret; + bt_status_t ret __attribute__((unused)); BTC_TRACE_DEBUG("%s: Storing link key. key_type=0x%x", __FUNCTION__, p_auth_cmpl->key_type); ret = btc_storage_add_bonded_device(&bd_addr, diff --git a/components/bt/host/bluedroid/btc/include/btc/btc_common.h b/components/bt/host/bluedroid/btc/include/btc/btc_common.h index ae4501b5a80..ed225db7583 100644 --- a/components/bt/host/bluedroid/btc/include/btc/btc_common.h +++ b/components/bt/host/bluedroid/btc/include/btc/btc_common.h @@ -16,12 +16,12 @@ #ifndef __BTC_COMMON_H__ #define __BTC_COMMON_H__ +#include #include "common/bt_trace.h" #include "stack/bt_types.h" #include "osi/osi.h" -#define BTC_ASSERTC(cond, msg, val) if (!(cond)) { LOG_ERROR( \ - "### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);} +#define BTC_ASSERTC(cond, msg, val) assert(cond && msg) #define BTC_HAL_CBACK(P_CB, P_CBACK, ...)\ if (P_CB && P_CB->P_CBACK) { \