From: Thomas Monjalon Date: Tue, 4 Aug 2015 14:19:43 +0000 (+0200) Subject: pci: fix bsd build with gcc X-Git-Tag: spdx-start~8555 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1c9d836159d5d0a22c0eca79de8fd041eafc795b;p=dpdk.git 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: 632b2d1deeed ("eal: provide functions to access PCI config") Signed-off-by: Thomas Monjalon Acked-by: Bruce Richardson --- diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 6fa0d0884e..6c21fbd4c7 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -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, };