Skip to content

Commit 4b7146b

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Add missing void in memcpy calls
Minor convention changes to have void in memcpy function calls. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 6976b03 commit 4b7146b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

subsys/bluetooth/controller/ll_sw/ull_adv_sync.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static uint8_t adv_sync_pdu_init_from_prev_pdu(struct pdu_adv *pdu,
183183

184184
if (IS_ENABLED(CONFIG_BT_CTLR_ADV_PERIODIC_ADI_SUPPORT) && ext_hdr->adi != 0) {
185185
if (ext_hdr_prev->adi) {
186-
memcpy(dptr, dptr_prev, sizeof(struct pdu_adv_adi));
186+
(void)memcpy(dptr, dptr_prev, sizeof(struct pdu_adv_adi));
187187
}
188188
dptr += sizeof(struct pdu_adv_adi);
189189
}
@@ -204,7 +204,7 @@ static uint8_t adv_sync_pdu_init_from_prev_pdu(struct pdu_adv *pdu,
204204
/* Copy TxPower, if applicable */
205205
if (ext_hdr->tx_pwr) {
206206
if (ext_hdr_prev->tx_pwr) {
207-
memcpy(dptr, dptr_prev, sizeof(uint8_t));
207+
(void)memcpy(dptr, dptr_prev, sizeof(uint8_t));
208208
}
209209
dptr += sizeof(uint8_t);
210210
}
@@ -216,7 +216,7 @@ static uint8_t adv_sync_pdu_init_from_prev_pdu(struct pdu_adv *pdu,
216216

217217
/* Copy ACAD */
218218
len = com_hdr_prev->ext_hdr_len - (dptr_prev - (uint8_t *)ext_hdr_prev);
219-
memcpy(dptr, dptr_prev, len);
219+
(void)memcpy(dptr, dptr_prev, len);
220220
dptr += len;
221221

222222
/* Check populated ext header length excluding length itself. If 0, then
@@ -249,7 +249,7 @@ static uint8_t adv_sync_pdu_init_from_prev_pdu(struct pdu_adv *pdu,
249249
/* Copy AD */
250250
if (!(ext_hdr_flags_rem & ULL_ADV_PDU_HDR_FIELD_AD_DATA)) {
251251
len = MIN(len, len_prev);
252-
memcpy(dptr, dptr_prev, len);
252+
(void)memcpy(dptr, dptr_prev, len);
253253
dptr += len;
254254
}
255255

@@ -278,7 +278,7 @@ uint8_t adv_sync_pdu_ad_data_set(struct pdu_adv *pdu, const uint8_t *data, uint8
278278
return BT_HCI_ERR_PACKET_TOO_LONG;
279279
}
280280

281-
memcpy(dptr, data, len);
281+
(void)memcpy(dptr, data, len);
282282
dptr += len;
283283

284284
pdu->len = dptr - pdu->payload;
@@ -301,7 +301,7 @@ uint8_t ull_adv_sync_pdu_cte_info_set(struct pdu_adv *pdu, const struct pdu_cte_
301301
LL_ASSERT(!ext_hdr->tgt_addr);
302302

303303
if (ext_hdr->cte_info) {
304-
memcpy(dptr, cte_info, sizeof(*cte_info));
304+
(void)memcpy(dptr, cte_info, sizeof(*cte_info));
305305
}
306306

307307
return 0;
@@ -667,7 +667,7 @@ uint8_t ll_adv_sync_enable(uint8_t handle, uint8_t enable)
667667
* sync_info structure, followed by pointer to sync_info in the
668668
* PDU.
669669
*/
670-
memcpy(&sync_info, &value[1], sizeof(sync_info));
670+
(void)memcpy(&sync_info, &value[1], sizeof(sync_info));
671671
ull_adv_sync_info_fill(sync, sync_info);
672672

673673
if (lll_aux) {
@@ -1066,8 +1066,8 @@ void ull_adv_sync_info_fill(struct ll_adv_sync_set *sync,
10661066
/* Fill the interval, access address and CRC init */
10671067
si->interval = sys_cpu_to_le16(sync->interval);
10681068
lll_sync = &sync->lll;
1069-
memcpy(&si->aa, lll_sync->access_addr, sizeof(si->aa));
1070-
memcpy(si->crc_init, lll_sync->crc_init, sizeof(si->crc_init));
1069+
(void)memcpy(&si->aa, lll_sync->access_addr, sizeof(si->aa));
1070+
(void)memcpy(si->crc_init, lll_sync->crc_init, sizeof(si->crc_init));
10711071

10721072
/* NOTE: Filled by secondary prepare */
10731073
si->evt_cntr = 0U;
@@ -1324,7 +1324,7 @@ uint8_t ull_adv_sync_pdu_set_clear(struct lll_adv_sync *lll_sync,
13241324
*(uint8_t *)hdr_data = acad_len_prev;
13251325
hdr_data = (uint8_t *)hdr_data + 1;
13261326
/* return the pointer to ACAD offset */
1327-
memcpy(hdr_data, &ter_dptr, sizeof(ter_dptr));
1327+
(void)memcpy(hdr_data, &ter_dptr, sizeof(ter_dptr));
13281328
hdr_data = (uint8_t *)hdr_data + sizeof(ter_dptr);
13291329
ter_dptr += acad_len;
13301330
} else if (!(hdr_rem_fields & ULL_ADV_PDU_HDR_FIELD_ACAD)) {
@@ -1497,7 +1497,7 @@ void ull_adv_sync_extra_data_set_clear(void *extra_data_prev,
14971497
* CTE additional data are just copied to extra_data memory.
14981498
*/
14991499
if (hdr_add_fields & ULL_ADV_PDU_HDR_FIELD_CTE_INFO) {
1500-
memcpy(extra_data_new, data, sizeof(struct lll_df_adv_cfg));
1500+
(void)memcpy(extra_data_new, data, sizeof(struct lll_df_adv_cfg));
15011501
} else if (!(hdr_rem_fields & ULL_ADV_PDU_HDR_FIELD_CTE_INFO) ||
15021502
extra_data_prev) {
15031503
(void)memmove(extra_data_new, extra_data_prev,

0 commit comments

Comments
 (0)