From 46a8982a80cbc25c3e45c602c2acc871dcdc9ab6 Mon Sep 17 00:00:00 2001 From: lly Date: Mon, 11 May 2020 17:05:06 +0800 Subject: [PATCH] ble_mesh: A specific fix for compile warning in idf3.3 - Remove the extra #include "bt_common.h" in mesh_timer.c - Compared with the latest idf, idf3.3 defines BIT(nr) in the "soc/soc.h" without the pre-condition "#ifndef BIT", which will cause compile warning when using mesh. So we include the header file "soc/soc.h" in "mesh_util.h", which can bypass the definition of "BIT" in "mesh_util.h" when compiling. --- components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h | 1 + components/bt/esp_ble_mesh/mesh_common/mesh_timer.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h b/components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h index 78b9ddf7b2..7eebe71b46 100644 --- a/components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h +++ b/components/bt/esp_ble_mesh/mesh_common/include/mesh_util.h @@ -15,6 +15,7 @@ #define _BLE_MESH_UTIL_H_ #include +#include "soc/soc.h" #include "mesh_types.h" #ifdef __cplusplus diff --git a/components/bt/esp_ble_mesh/mesh_common/mesh_timer.c b/components/bt/esp_ble_mesh/mesh_common/mesh_timer.c index 58fd882f22..76b7ac2a9f 100644 --- a/components/bt/esp_ble_mesh/mesh_common/mesh_timer.c +++ b/components/bt/esp_ble_mesh/mesh_common/mesh_timer.c @@ -14,7 +14,6 @@ #include "mesh_common.h" #include "provisioner_prov.h" -#include "bt_common.h" static hash_map_t *bm_alarm_hash_map; static const size_t BLE_MESH_GENERAL_ALARM_HASH_MAP_SIZE = 20 + CONFIG_BLE_MESH_PBA_SAME_TIME + \