From fd661859edbddc06961acf6ae68563ed782bbbf8 Mon Sep 17 00:00:00 2001 From: yidong0635 Date: Tue, 27 Oct 2020 05:28:05 -0400 Subject: [PATCH] nvmf/ctrlr: Fix scanbuild warning. Issue: ctrlr.c:1851:13: warning: Although the value stored to 'copy_len' is used in the enclosing expression, the value is never actually read from 'copy_len' next_pos = copy_len = 0; ^ ~ Signed-off-by: yidong0635 Change-Id: Ie6d402cd4ad206ae5713deb15e2d03929bac94f4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4823 Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Shuhei Matsumoto Community-CI: Mellanox Build Bot --- lib/nvmf/ctrlr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index c0b691aea..f50b6f986 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -1850,7 +1850,7 @@ nvmf_get_reservation_notification_log_page(struct spdk_nvmf_ctrlr *ctrlr, return; } - next_pos = copy_len = 0; + next_pos = 0; TAILQ_FOREACH_SAFE(log, &ctrlr->log_head, link, log_tmp) { TAILQ_REMOVE(&ctrlr->log_head, log, link); ctrlr->num_avail_log_pages--;