diff --git a/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c b/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c index 6fe3da8b7e..ac2fabb07a 100644 --- a/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c +++ b/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c @@ -1017,7 +1017,7 @@ int btc_ble_mesh_client_model_init(esp_ble_mesh_model_t *model) return -EINVAL; } - __ASSERT(model && model->op, "%s, Invalid parameter", __func__); + __ASSERT(model && model->op, "Invalid parameter"); esp_ble_mesh_model_op_t *op = model->op; while (op != NULL && op->opcode != 0) { op->param_cb = (esp_ble_mesh_cb_t)btc_ble_mesh_client_model_op_cb; diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_trace.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_trace.h index aa46790f12..3d9a94b363 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_trace.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_trace.h @@ -9,6 +9,7 @@ #ifndef _BLE_MESH_TRACE_H_ #define _BLE_MESH_TRACE_H_ +#include #include "esp_log.h" #include "mesh_util.h" #include "esp_rom_sys.h" @@ -72,21 +73,11 @@ extern "C" { #define STRINGIFY(s) _STRINGIFY(s) #ifndef __ASSERT -#define __ASSERT(test, fmt, ...) \ - do { \ - if (!(test)) { \ - printk("ASSERTION FAIL [%s] @ %s:%d:\n\t", \ - _STRINGIFY(test), \ - __FILE__, \ - __LINE__); \ - printk(fmt, ##__VA_ARGS__); \ - for (;;); \ - } \ - } while ((0)) +#define __ASSERT(test, str) assert(test) #endif #ifndef __ASSERT_NO_MSG -#define __ASSERT_NO_MSG(x) do { if (!(x)) BLE_MESH_PRINT_E(BLE_MESH_TRACE_TAG, "error %s %u", __FILE__, __LINE__); } while (0) +#define __ASSERT_NO_MSG(x) assert(x) #endif #if !CONFIG_BLE_MESH_NO_LOG diff --git a/components/bt/esp_ble_mesh/mesh_core/adv.c b/components/bt/esp_ble_mesh/mesh_core/adv.c index a697c5e860..b098fb70ca 100644 --- a/components/bt/esp_ble_mesh/mesh_core/adv.c +++ b/components/bt/esp_ble_mesh/mesh_core/adv.c @@ -652,6 +652,7 @@ void bt_mesh_adv_init(void) int ret = xTaskCreatePinnedToCore(adv_thread, BLE_MESH_ADV_TASK_NAME, BLE_MESH_ADV_TASK_STACK_SIZE, NULL, BLE_MESH_ADV_TASK_PRIO, &adv_task.handle, BLE_MESH_ADV_TASK_CORE); __ASSERT(ret == pdTRUE, "Failed to create adv thread"); + (void)ret; #endif /* CONFIG_BLE_MESH_FREERTOS_STATIC_ALLOC_EXTERNAL && CONFIG_SPIRAM_CACHE_WORKAROUND && CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY */ }