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;
         ^
This commit is contained in:
Hrishikesh Dhayagude
2019-06-13 09:16:50 +02:00
committed by Szymon Janc
parent b0e723fa37
commit d5ede9c755
@@ -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;