Spdk/test/unit/lib/bdev/nvme/bdev_nvme.c
Nick Connolly 292b8e0c3e ut/bdev_nvme: fix 'used uninitialised' warning
On some platforms, GCC identifies that opts.io_queue_requests is used
uninitialised in bdev_nvme_create_qpair due to the stub function
spdk_nvme_ctrlr_get_default_io_qpair_opts which would normally zero the
qpair opts. Whether the warning appears is likely to be determined by
how effectively the platform garbage collects unused code.

Replace the stub with a minimal implementation that zeros the qpair
opts to avoid the warning.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I2b8c2d657ae5401c3b35ca66938a966906cdc846
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6595
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-05 08:33:30 +00:00
..
.gitignore ut/bdev_nvme: Create framework and add test case to create nvme_bdev_ctrlr 2021-02-18 13:36:33 +00:00
bdev_nvme_ut.c ut/bdev_nvme: fix 'used uninitialised' warning 2021-03-05 08:33:30 +00:00
Makefile ut/bdev_nvme: Create framework and add test case to create nvme_bdev_ctrlr 2021-02-18 13:36:33 +00:00