You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/07/13 20:55:50 UTC

[37/50] [abbrv] incubator-mynewt-core git commit: BLE Host - Fix spurious maybe-uninitialized warn.

BLE Host - Fix spurious maybe-uninitialized warn.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/5ccea9b6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/5ccea9b6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/5ccea9b6

Branch: refs/heads/develop
Commit: 5ccea9b6c74a35ca34be7a17b5d63fc3dcda0bda
Parents: fe13229
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Jul 11 16:48:25 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Jul 11 16:48:25 2016 -0700

----------------------------------------------------------------------
 net/nimble/host/src/ble_gap.c | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5ccea9b6/net/nimble/host/src/ble_gap.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gap.c b/net/nimble/host/src/ble_gap.c
index 73c9e42..27616f2 100644
--- a/net/nimble/host/src/ble_gap.c
+++ b/net/nimble/host/src/ble_gap.c
@@ -745,6 +745,10 @@ ble_gap_rx_update_complete(struct hci_le_conn_upd_complete *evt)
         }
 
         ble_gap_conn_to_snapshot(conn, &snap);
+    } else {
+        /* Silence spurious maybe-uninitialized warning. */
+        snap.cb = NULL;
+        snap.cb_arg = NULL;
     }
 
     conn->bhc_flags &= ~BLE_HS_CONN_F_UPDATE;