lib/idxd: Fixed compilation issue (gcc 12.2.1)
Added initialization of the prev_crc variable to avoid compilation error: idxd.c: In function ?spdk_idxd_submit_copy_crc32c?: idxd.c:1138:51: error: ?prev_crc? may be used uninitialized [-Werror=maybe-uninitialized] 1138 | desc->crc32c.addr = prev_crc; | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~ idxd.c:1081:18: note: ?prev_crc? was declared here 1081 | uint64_t prev_crc; | ^~~~~~~~ Change-Id: I6b93d5d85b52e20f8a2c313c41b740f66eebe1c7 Signed-off-by: Marcin Spiewak <marcin.spiewak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16900 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
2b772dbbbc
commit
ba20950a53
@ -983,7 +983,7 @@ spdk_idxd_submit_crc32c(struct spdk_idxd_io_channel *chan,
|
|||||||
uint64_t len, seg_len;
|
uint64_t len, seg_len;
|
||||||
void *src;
|
void *src;
|
||||||
size_t i;
|
size_t i;
|
||||||
uint64_t prev_crc;
|
uint64_t prev_crc = 0;
|
||||||
|
|
||||||
assert(chan != NULL);
|
assert(chan != NULL);
|
||||||
assert(siov != NULL);
|
assert(siov != NULL);
|
||||||
@ -1078,7 +1078,7 @@ spdk_idxd_submit_copy_crc32c(struct spdk_idxd_io_channel *chan,
|
|||||||
uint64_t len, seg_len;
|
uint64_t len, seg_len;
|
||||||
struct spdk_ioviter iter;
|
struct spdk_ioviter iter;
|
||||||
struct idxd_vtophys_iter vtophys_iter;
|
struct idxd_vtophys_iter vtophys_iter;
|
||||||
uint64_t prev_crc;
|
uint64_t prev_crc = 0;
|
||||||
|
|
||||||
assert(chan != NULL);
|
assert(chan != NULL);
|
||||||
assert(diov != NULL);
|
assert(diov != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user