From 88e676f7b18d102622623ab0962f6ea7aba6990d Mon Sep 17 00:00:00 2001 From: Pawel Piatek Date: Thu, 13 Jan 2022 18:39:05 +0100 Subject: [PATCH] idxd: fix may be used uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nightly build failing on Centos 7 machine C compiler for the host machine: cc (gcc 4.8.5 "cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)") C linker for the host machine: cc ld.bfd 2.27-44 Host machine cpu family: x86_64 Host machine cpu: x86_64 Errors like: idxd.c: In function ‘spdk_idxd_submit_crc32c’: idxd.c:902:24: error: ‘prev_crc’ may be used uninitialized in this function [-Werror=maybe-uninitialized] desc->crc32c.addr = (uint64_t)prev_crc; Signed-off-by: Pawel Piatek Change-Id: Ib40160b1974ecd3f1579566b6eb5d88e03b5bb2b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11082 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Konrad Sztyber Reviewed-by: Jim Harris --- lib/idxd/idxd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index 31a378aa5..fb951f214 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -965,6 +965,7 @@ spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan, return -EBUSY; } + prev_crc = NULL; for (i = 0; i < siovcnt; i++) { rc = _idxd_prep_batch_cmd(chan, NULL, NULL, batch, &desc, &op); if (rc) {