diff --git a/components/bt/esp_ble_mesh/core/net.h b/components/bt/esp_ble_mesh/core/net.h index 1141bd2bd9..b5f5ff0a78 100644 --- a/components/bt/esp_ble_mesh/core/net.h +++ b/components/bt/esp_ble_mesh/core/net.h @@ -472,7 +472,8 @@ void bt_mesh_generic_net_recv(struct net_buf_simple *data, static inline void bt_mesh_net_recv(struct net_buf_simple *data, int8_t rssi, enum bt_mesh_net_if net_if) { - struct bt_mesh_net_rx rx = { .ctx.recv_rssi = rssi }; + struct bt_mesh_net_rx rx = {0}; + rx.ctx.recv_rssi = rssi; #if CONFIG_BLE_MESH_EXT_ADV rx.ctx.enh.adv_cfg_used = false; rx.ctx.enh.ext_adv_cfg_used = false; diff --git a/components/bt/esp_ble_mesh/core/nimble_host/adapter.c b/components/bt/esp_ble_mesh/core/nimble_host/adapter.c index 4d598a333e..1992fb87b3 100644 --- a/components/bt/esp_ble_mesh/core/nimble_host/adapter.c +++ b/components/bt/esp_ble_mesh/core/nimble_host/adapter.c @@ -474,7 +474,7 @@ void bt_mesh_ble_ext_adv_report(struct ble_gap_ext_disc_desc *desc) /* Here, only a shallow copy needs to be implemented; * deep copying behavior occurs in btc_ble_mesh_ble_copy_req_data. */ - adv_rpt.data = desc->length_data ? desc->data : NULL; + adv_rpt.data = desc->length_data ? (uint8_t *)desc->data : NULL; adv_rpt.event_type = desc->props; adv_rpt.addr_type = desc->addr.type;