pci: fix bsd build with gcc

GCC 4.8 raises this error:
lib/librte_eal/bsdapp/eal/eal_pci.c:453:15: error: cast discards
'__attribute__((const))' qualifier from pointer target type
   .pi_data = *(u_int32_t *)buf,
               ^

Note: this assignment seems useless because pi_data is filled
with memset later.

Fixes: 632b2d1dee ("eal: provide functions to access PCI config")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
Thomas Monjalon 2015-08-04 16:19:43 +02:00
parent 40cf5f884a
commit 1c9d836159

View File

@ -450,7 +450,7 @@ int rte_eal_pci_write_config(const struct rte_pci_device *dev,
.pc_func = dev->addr.function,
},
.pi_reg = offset,
.pi_data = *(u_int32_t *)buf,
.pi_data = *(const uint32_t *)buf,
.pi_width = len,
};