This is an automated email from the ASF dual-hosted git repository.
rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new e7dead61 ll: Fix compiler error
e7dead61 is described below
commit e7dead61af783631c828824e4e80636828cb6520
Author: Łukasz Rymanowski <[email protected]>
AuthorDate: Fri Jan 13 11:28:46 2023 +0100
ll: Fix compiler error
Fixing false possitive compiler error
/home/rymek/projects/bletiny_proj/repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_scan.c:456:12:
error: array subscript <unknown> is outside array bounds of 'struct
ble_ll_scan_advertisers[0]'
[␛]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-bounds␇-Werror=array-bounds␛]8;;␇]
456 | memcpy(&adv->adv_addr, addr, BLE_DEV_ADDR_LEN);
---
nimble/controller/src/ble_ll_scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nimble/controller/src/ble_ll_scan.c
b/nimble/controller/src/ble_ll_scan.c
index 7c16dd35..b7516e78 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -442,7 +442,7 @@ ble_ll_scan_add_scan_rsp_adv(uint8_t *addr, uint8_t txadd,
/* XXX: for now, if we dont have room, just leave */
num_advs = g_ble_ll_scan_num_rsp_advs;
- if (num_advs == MYNEWT_VAL(BLE_LL_NUM_SCAN_RSP_ADVS)) {
+ if (num_advs >= MYNEWT_VAL(BLE_LL_NUM_SCAN_RSP_ADVS)) {
return;
}