* [dpdk-dev] [PATCH] eal/bsdapp: fix compilation on FreeBSD
@ 2015-05-05 12:47 Bruce Richardson
2015-05-11 13:45 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Bruce Richardson @ 2015-05-05 12:47 UTC (permalink / raw)
To: dev
Fixes: 6065355a "pci: make device id tables const"
Following the above commit, compilation on FreeBSD with clang was broken,
giving the error message:
.../lib/librte_eal/bsdapp/eal/eal_pci.c:438:16: fatal error: assigning to
'struct rte_pci_id *' from 'const struct rte_pci_id *' discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {
^ ~~~~~~~~~~~~
This patch fixes the issue by adding "const" to the type of id_table.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.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 30f0232..61e8921 100644
--- a/lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
@@ -432,7 +432,7 @@ error:
int
rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *dev)
{
- struct rte_pci_id *id_table;
+ const struct rte_pci_id *id_table;
int ret;
for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {
--
2.1.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] eal/bsdapp: fix compilation on FreeBSD
2015-05-05 12:47 [dpdk-dev] [PATCH] eal/bsdapp: fix compilation on FreeBSD Bruce Richardson
@ 2015-05-11 13:45 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2015-05-11 13:45 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
> Fixes: 6065355a "pci: make device id tables const"
>
> Following the above commit, compilation on FreeBSD with clang was broken,
> giving the error message:
>
> .../lib/librte_eal/bsdapp/eal/eal_pci.c:438:16: fatal error: assigning to
> 'struct rte_pci_id *' from 'const struct rte_pci_id *' discards qualifiers
> [-Wincompatible-pointer-types-discards-qualifiers]
> for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {
> ^ ~~~~~~~~~~~~
>
> This patch fixes the issue by adding "const" to the type of id_table.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-11 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05 12:47 [dpdk-dev] [PATCH] eal/bsdapp: fix compilation on FreeBSD Bruce Richardson
2015-05-11 13:45 ` 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).