Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 486dd5705 -> 42b5203a9


BLE Host - Silence some warnings.

Forgot to build with optimization!


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/42b5203a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/42b5203a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/42b5203a

Branch: refs/heads/develop
Commit: 42b5203a942a67bedff9a8ad9f92fc32afca640b
Parents: 486dd57
Author: Christopher Collins <[email protected]>
Authored: Sat May 21 15:25:17 2016 -0700
Committer: Christopher Collins <[email protected]>
Committed: Sat May 21 15:25:17 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/42b5203a/net/nimble/host/src/ble_gatts.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_gatts.c b/net/nimble/host/src/ble_gatts.c
index 7a9a939..2464fe8 100644
--- a/net/nimble/host/src/ble_gatts.c
+++ b/net/nimble/host/src/ble_gatts.c
@@ -1224,6 +1224,10 @@ ble_gatts_chr_updated(uint16_t chr_val_handle)
              */
             att_op = ble_gatts_schedule_update(conn, clt_cfg);
             conn_handle = conn->bhc_handle;
+        } else {
+            /* Silence some spurious gcc warnings. */
+            att_op = 0;
+            conn_handle = BLE_HS_CONN_HANDLE_NONE;
         }
         ble_hs_unlock();
 
@@ -1335,6 +1339,9 @@ ble_gatts_bonding_restored(uint16_t conn_handle)
             break;
         }
 
+        /* Assume no immediate send for this characteristic. */
+        att_op = 0;
+
         ble_hs_lock();
 
         conn = ble_hs_conn_find(conn_handle);

Reply via email to