Bluetooth: Mesh: fix shadow declare
CC: mesh/adv.c mesh/adv.c: In function 'bt_mesh_scan_cb': mesh/adv.c:247:13: warning: declaration of 'adv_type' shadows a global declaration [-Wshadow] 247 | u8_t adv_type, struct net_buf_simple *buf) | ~~~~~^~~~~~~~ mesh/adv.c:58:19: note: shadowed declaration is here 58 | static const u8_t adv_type[] = { | ^~~~~~~~ CC: mesh/prov.c mesh/prov.c: In function 'bt_mesh_prov_enable': mesh/prov.c:1203:30: warning: declaration of 'prov' shadows a global declaration [-Wshadow] 1203 | const struct bt_mesh_prov *prov = bt_mesh_prov_get(); | ^~~~ mesh/prov.c:129:35: note: shadowed declaration is here 129 | static const struct bt_mesh_prov *prov; | ^~~~ Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
6a2f50aba2
commit
bb5ce8ae30
2 changed files with 6 additions and 8 deletions
|
@ -55,13 +55,6 @@ static K_FIFO_DEFINE(adv_queue);
|
|||
static struct k_thread adv_thread_data;
|
||||
static K_THREAD_STACK_DEFINE(adv_thread_stack, ADV_STACK_SIZE);
|
||||
|
||||
static const u8_t adv_type[] = {
|
||||
[BT_MESH_ADV_PROV] = BT_DATA_MESH_PROV,
|
||||
[BT_MESH_ADV_DATA] = BT_DATA_MESH_MESSAGE,
|
||||
[BT_MESH_ADV_BEACON] = BT_DATA_MESH_BEACON,
|
||||
[BT_MESH_ADV_URI] = BT_DATA_URI,
|
||||
};
|
||||
|
||||
NET_BUF_POOL_DEFINE(adv_buf_pool, CONFIG_BT_MESH_ADV_BUF_COUNT,
|
||||
BT_MESH_ADV_DATA_SIZE, BT_MESH_ADV_USER_DATA_SIZE, NULL);
|
||||
|
||||
|
@ -91,6 +84,12 @@ static inline void adv_send_end(int err, const struct bt_mesh_send_cb *cb,
|
|||
|
||||
static inline void adv_send(struct net_buf *buf)
|
||||
{
|
||||
static const u8_t adv_type[] = {
|
||||
[BT_MESH_ADV_PROV] = BT_DATA_MESH_PROV,
|
||||
[BT_MESH_ADV_DATA] = BT_DATA_MESH_MESSAGE,
|
||||
[BT_MESH_ADV_BEACON] = BT_DATA_MESH_BEACON,
|
||||
[BT_MESH_ADV_URI] = BT_DATA_URI,
|
||||
};
|
||||
const s32_t adv_int_min = ((bt_dev.hci_version >= BT_HCI_VERSION_5_0) ?
|
||||
ADV_INT_FAST_MS : ADV_INT_DEFAULT_MS);
|
||||
const struct bt_mesh_send_cb *cb = BT_MESH_ADV(buf)->cb;
|
||||
|
|
|
@ -1199,7 +1199,6 @@ int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers)
|
|||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_DEBUG)) {
|
||||
const struct bt_mesh_prov *prov = bt_mesh_prov_get();
|
||||
struct bt_uuid_128 uuid = { .uuid = { BT_UUID_TYPE_128 } };
|
||||
|
||||
memcpy(uuid.val, prov->uuid, 16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue