This is an automated email from the ASF dual-hosted git repository.
janc 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 e49531b54 nimble/host: Fix -Wsign-compare in notify_multiple functions
e49531b54 is described below
commit e49531b541402123741ae21b8728b1b301e45ef1
Author: Deomid rojer Ryabkov <[email protected]>
AuthorDate: Tue Mar 31 23:43:43 2026 +0300
nimble/host: Fix -Wsign-compare in notify_multiple functions
Change loop variable from int to size_t to match the type of
chr_count and num_handles it is compared against.
---
nimble/host/src/ble_gattc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/nimble/host/src/ble_gattc.c b/nimble/host/src/ble_gattc.c
index 87df86f8d..0418a405b 100644
--- a/nimble/host/src/ble_gattc.c
+++ b/nimble/host/src/ble_gattc.c
@@ -4424,7 +4424,7 @@ ble_gatts_notify_multiple_custom(uint16_t conn_handle,
#endif
int rc;
- int i = 0;
+ size_t i = 0;
uint16_t cur_chr_cnt = 0;
/* mtu = MTU - 1 octet (OP code) */
uint16_t mtu = ble_att_mtu(conn_handle) - 1;
@@ -4514,7 +4514,8 @@ ble_gatts_notify_multiple(uint16_t conn_handle,
#if !MYNEWT_VAL(BLE_GATT_NOTIFY_MULTIPLE)
return BLE_HS_ENOTSUP;
#endif
- int rc, i;
+ int rc;
+ size_t i;
struct ble_gatt_notif tuples[num_handles];
struct ble_hs_conn *conn;