ut/nvme: Fix compilation warning
GCC 4.8.5 compains on missing braces: nvme_tcp_ut.c: In function 'test_nvme_tcp_req_complete_safe': nvme_tcp_ut.c:456:9: warning: missing braces around initializer [-Wmissing-braces] struct nvme_request req = {0}; ^ nvme_tcp_ut.c:456:9: warning: (near initialization for 'req.cmd') [-Wmissing-braces] nvme_tcp_ut.c:458:9: warning: missing braces around initializer [-Wmissing-braces] struct nvme_tcp_qpair tqpair = {0}; ^ nvme_tcp_ut.c:458:9: warning: (near initialization for 'tqpair.qpair') [-Wmissing-braces] Also structure spdk_nvme_qpair is embedded into nvme_tcp_qpair, there is no need in a separate variable. Change-Id: I3a9d6760a0cffe90ece0a6d470dda8309a6619e7 Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5985 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: <dongx.yi@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
5a499ac098
commit
1d6ccec9ec
@ -452,13 +452,12 @@ static void
|
||||
test_nvme_tcp_req_complete_safe(void)
|
||||
{
|
||||
bool rc;
|
||||
struct nvme_tcp_req tcp_req = {0};
|
||||
struct nvme_request req = {0};
|
||||
struct spdk_nvme_qpair qpair = {0};
|
||||
struct nvme_tcp_qpair tqpair = {0};
|
||||
struct nvme_tcp_req tcp_req = {0};
|
||||
struct nvme_request req = {{0}};
|
||||
struct nvme_tcp_qpair tqpair = {{0}};
|
||||
|
||||
tcp_req.req = &req;
|
||||
tcp_req.req->qpair = &qpair;
|
||||
tcp_req.req->qpair = &tqpair.qpair;
|
||||
tcp_req.req->cb_fn = ut_nvme_complete_request;
|
||||
tcp_req.tqpair = &tqpair;
|
||||
tcp_req.state = NVME_TCP_REQ_ACTIVE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user