You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by na...@apache.org on 2021/05/27 08:19:53 UTC

[mynewt-nimble] 15/31: mesh: Explicitly ignore gatt_service_register return code

This is an automated email from the ASF dual-hosted git repository.

naraj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit b2f8d90f638f095af1cd3ae5ae98a92d40263ce5
Author: Krzysztof Kopyściński <kr...@codecoup.pl>
AuthorDate: Mon Mar 29 14:00:26 2021 +0200

    mesh: Explicitly ignore gatt_service_register return code
    
    The error code from gatt_service_register is being ignored to ensure
    that repeated actions still complete. Do this explicitly by adding
    (void) casts, resolving coverity warnings on accidental error code
    ignores.
    
    this is port of f9d41595a3a168d982e95c1f46ef9fb8b989c55b
---
 nimble/host/mesh/src/mesh.c    | 2 +-
 nimble/host/mesh/src/pb_gatt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nimble/host/mesh/src/mesh.c b/nimble/host/mesh/src/mesh.c
index bbb4ee3..10c6fff 100644
--- a/nimble/host/mesh/src/mesh.c
+++ b/nimble/host/mesh/src/mesh.c
@@ -117,7 +117,7 @@ int bt_mesh_provision(const uint8_t net_key[16], uint16_t net_idx,
 		atomic_clear_bit(bt_mesh.flags, BT_MESH_VALID);
 
 		if (MYNEWT_VAL(BLE_MESH_PB_GATT)  && pb_gatt_enabled) {
-			bt_mesh_proxy_prov_enable();
+			(void)bt_mesh_proxy_prov_enable();
 		}
 
 		return err;
diff --git a/nimble/host/mesh/src/pb_gatt.c b/nimble/host/mesh/src/pb_gatt.c
index a8f7378..bce7cf6 100644
--- a/nimble/host/mesh/src/pb_gatt.c
+++ b/nimble/host/mesh/src/pb_gatt.c
@@ -115,7 +115,7 @@ int bt_mesh_pb_gatt_close(uint16_t conn_handle)
 
 static int link_accept(const struct prov_bearer_cb *cb, void *cb_data)
 {
-	bt_mesh_proxy_prov_enable();
+	(void)bt_mesh_proxy_prov_enable();
 	bt_mesh_adv_update();
 
 	link.cb = cb;