From 4fa43078dbae1ff90c2606985de20103535fed44 Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Fri, 14 Aug 2015 09:05:52 +0100 Subject: [PATCH] initialize all members of gattc_write_params_t in GattClient::write(). This avoids some compiler warnings about un-initialized members. --- source/nRF5xGattClient.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/nRF5xGattClient.h b/source/nRF5xGattClient.h index b8764f6..76a015e 100644 --- a/source/nRF5xGattClient.h +++ b/source/nRF5xGattClient.h @@ -122,9 +122,11 @@ public: } virtual ble_error_t write(GattClient::WriteOp_t cmd, Gap::Handle_t connHandle, GattAttribute::Handle_t attributeHandle, size_t length, const uint8_t *value) const { - ble_gattc_write_params_t writeParams = { }; + ble_gattc_write_params_t writeParams; writeParams.write_op = cmd; + writeParams.flags = 0; /* this is inconsequential */ writeParams.handle = attributeHandle; + writeParams.offset = 0; writeParams.len = length; writeParams.p_value = const_cast(value);