initialize all members of gattc_write_params_t in GattClient::write().

This avoids some compiler warnings about un-initialized members.
This commit is contained in:
Rohit Grover 2015-08-14 09:05:52 +01:00
parent 6a5d142f03
commit 4fa43078db

View file

@ -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<uint8_t *>(value);