You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2019/06/13 07:16:56 UTC
[mynewt-nimble] branch master updated: nimble/host: Fix compilation
error when asserts are disabled
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 d5ede9c nimble/host: Fix compilation error when asserts are disabled
d5ede9c is described below
commit d5ede9c75510d357c51652a3841855264b354fff
Author: Hrishikesh Dhayagude <hr...@espressif.com>
AuthorDate: Thu Jun 13 10:47:36 2019 +0530
nimble/host: Fix compilation error when asserts are disabled
/home/nimble/host/services/gap/src/ble_svc_gap.c:195:9:
error: 'rc' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
int rc;
^
---
nimble/host/services/gap/src/ble_svc_gap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/nimble/host/services/gap/src/ble_svc_gap.c b/nimble/host/services/gap/src/ble_svc_gap.c
index 49ccf9d..7a1e76f 100644
--- a/nimble/host/services/gap/src/ble_svc_gap.c
+++ b/nimble/host/services/gap/src/ble_svc_gap.c
@@ -205,6 +205,7 @@ ble_svc_gap_access(uint16_t conn_handle, uint16_t attr_handle,
rc = ble_svc_gap_device_name_write_access(ctxt);
} else {
assert(0);
+ rc = BLE_ATT_ERR_UNLIKELY;
}
return rc;
@@ -215,6 +216,7 @@ ble_svc_gap_access(uint16_t conn_handle, uint16_t attr_handle,
rc = ble_svc_gap_appearance_write_access(ctxt);
} else {
assert(0);
+ rc = BLE_ATT_ERR_UNLIKELY;
}
return rc;