* [dpdk-dev] [PATCH] pci: fix bsd build with gcc
@ 2015-08-04 14:27 Thomas Monjalon
2015-08-04 15:05 ` Bruce Richardson
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2015-08-04 14:27 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
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 <thomas.monjalon@6wind.com>
---
lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c
index 6fa0d08..6c21fbd 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,
};
--
2.4.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] pci: fix bsd build with gcc
2015-08-04 14:27 [dpdk-dev] [PATCH] pci: fix bsd build with gcc Thomas Monjalon
@ 2015-08-04 15:05 ` Bruce Richardson
2015-08-04 15:10 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2015-08-04 15:05 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Tue, Aug 04, 2015 at 04:27:45PM +0200, Thomas Monjalon wrote:
> 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 <thomas.monjalon@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] pci: fix bsd build with gcc
2015-08-04 15:05 ` Bruce Richardson
@ 2015-08-04 15:10 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-08-04 15:10 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
2015-08-04 16:05, Bruce Richardson:
> On Tue, Aug 04, 2015 at 04:27:45PM +0200, Thomas Monjalon wrote:
> > 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 <thomas.monjalon@6wind.com>
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-04 15:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04 14:27 [dpdk-dev] [PATCH] pci: fix bsd build with gcc Thomas Monjalon
2015-08-04 15:05 ` Bruce Richardson
2015-08-04 15:10 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).