Skip to content

Commit fe23e06

Browse files
committed
nimble/gatt: Silence test build build warnings
Two test functions trigger false positive warning about usage of uninitialized variables. Now some local variables are initialized to silence those warnings Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
1 parent 037568d commit fe23e06

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nimble/host/test/src/ble_gatts_notify_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,9 @@ static void
474474
ble_gatts_notify_test_misc_verify_tx_gen(uint16_t conn_handle, int attr_idx,
475475
uint8_t chr_flags)
476476
{
477-
uint16_t attr_handle;
478-
uint16_t attr_len;
479-
void *attr_val;
477+
uint16_t attr_handle = 0;
478+
uint16_t attr_len = 0;
479+
void *attr_val = NULL;
480480

481481
switch (attr_idx) {
482482
case 1:

nimble/host/test/src/ble_gatts_reg_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ ble_gatts_reg_test_misc_lookup_bad(struct ble_gatts_reg_test_entry *entry)
261261
static void
262262
ble_gatts_reg_test_misc_verify_entry(uint8_t op, const ble_uuid_t *uuid)
263263
{
264-
struct ble_gatts_reg_test_entry *entry;
264+
struct ble_gatts_reg_test_entry *entry = NULL;
265265
int i;
266266

267267
for (i = 0; i < ble_gatts_reg_test_num_entries; i++) {

0 commit comments

Comments
 (0)