lib/nvme: fix a warning of spdk_pci_addr->domain

Compilation Warning on fedora30.
In file included from nvme_ut.c:42:
/home/vagrant/spdk_repo/spdk/test/common/lib/test_env.c:517:17:
warning: The left operand of '>' is a garbage value
        if (a1->domain > a2->domain) {
            ~~~~~~~~~~ ^
This is related to issue #822.

Change-Id: I2b61e821130b89af04db3c475e81d2e91a380a90
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459923
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Hailiang Wang 2019-07-01 15:00:28 +08:00 committed by Ben Walker
parent 6e4f5e0b53
commit 3a65c8729b

View File

@ -961,8 +961,8 @@ spdk_nvme_transport_id_compare(const struct spdk_nvme_transport_id *trid1,
}
if (trid1->trtype == SPDK_NVME_TRANSPORT_PCIE) {
struct spdk_pci_addr pci_addr1;
struct spdk_pci_addr pci_addr2;
struct spdk_pci_addr pci_addr1 = {};
struct spdk_pci_addr pci_addr2 = {};
/* Normalize PCI addresses before comparing */
if (spdk_pci_addr_parse(&pci_addr1, trid1->traddr) < 0 ||