Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_bci_452_v5.0' into 'release/v5.0'
Browse files Browse the repository at this point in the history
fix(bt/bluedroid): Fixed compile warning when optimize for performance (backport v5.0)

See merge request espressif/esp-idf!33135
  • Loading branch information
Isl2017 committed Aug 29, 2024
2 parents 57daec0 + 7844cca commit 9b4c775
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/bt/host/bluedroid/stack/gatt/gatt_sr_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static size_t calculate_database_info_size(void)
// Included service declaration
len += 8 + p_attr->p_value->incl_handle.service_type.len;
} else if (p_attr->uuid == GATT_UUID_CHAR_DECLARE) {
tBT_UUID char_uuid;
tBT_UUID char_uuid = {0};
// Characteristic declaration
p_attr = (tGATT_ATTR16 *)p_attr->p_next;
attr_uuid_to_bt_uuid((void *)p_attr, &char_uuid);
Expand Down Expand Up @@ -126,7 +126,7 @@ static void fill_database_info(UINT8 *p_data)
UINT16_TO_STREAM(p_data, p_attr->p_value->incl_handle.e_handle);
gatt_build_uuid_to_stream(&p_data, p_attr->p_value->incl_handle.service_type);
} else if (p_attr->uuid == GATT_UUID_CHAR_DECLARE) {
tBT_UUID char_uuid;
tBT_UUID char_uuid = {0};
// Characteristic declaration
UINT16_TO_STREAM(p_data, p_attr->handle);
UINT16_TO_STREAM(p_data, GATT_UUID_CHAR_DECLARE);
Expand Down Expand Up @@ -225,7 +225,7 @@ void gatts_show_local_database(void)
printf("\tend_handle %d\n", p_attr->p_value->incl_handle.e_handle);
break;
case GATT_UUID_CHAR_DECLARE: {
tBT_UUID char_uuid;
tBT_UUID char_uuid = {0};
tGATT_ATTR16 *p_char_val;
p_char_val = (tGATT_ATTR16 *)p_attr->p_next;
attr_uuid_to_bt_uuid((void *)p_char_val, &char_uuid);
Expand Down

0 comments on commit 9b4c775

Please sign in to comment.