From be2d126fd65754fd099e6b2ad5562244b2e1107a Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Thu, 4 Nov 2021 15:34:50 +0000 Subject: [PATCH] nvme/tcp: mark variable as potentially unused nvme_tcp_build_iovs() calculates the plen for the iovs, but only uses the calculated value in an assert, so we get set-but-not-used errors in release builds. So mark the variable as unused to squash those errors. Signed-off-by: Jim Harris Change-Id: Ifdf72faa6182c0fba622da9e5e2a33e3c6bbaf86 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10125 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu Reviewed-by: Dong Yi Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- include/spdk_internal/nvme_tcp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/spdk_internal/nvme_tcp.h b/include/spdk_internal/nvme_tcp.h index 711704b21..80a458b02 100644 --- a/include/spdk_internal/nvme_tcp.h +++ b/include/spdk_internal/nvme_tcp.h @@ -304,7 +304,8 @@ static int nvme_tcp_build_iovs(struct iovec *iov, int iovcnt, struct nvme_tcp_pdu *pdu, bool hdgst_enable, bool ddgst_enable, uint32_t *_mapped_length) { - uint32_t hlen, plen; + uint32_t hlen; + uint32_t plen __attribute__((unused)); struct spdk_iov_sgl *sgl; if (iovcnt == 0) {