DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal/headers: explicitly cast void * to type *
@ 2021-01-12  1:18 Tyler Retzlaff
  2021-01-13 17:52 ` Dmitry Kozlyuk
  2021-01-15 19:38 ` [dpdk-dev] [PATCH v2] eal/windows: " Tyler Retzlaff
  0 siblings, 2 replies; 13+ messages in thread
From: Tyler Retzlaff @ 2021-01-12  1:18 UTC (permalink / raw)
  To: dev; +Cc: dmitry.kozliuk, navasile

Explicitly cast void * to type * so that eal headers may be compiled
as C or C++.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/librte_eal/windows/include/rte_os.h | 2 +-
 lib/librte_ethdev/rte_ethdev_pci.h      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index ea3fe60e5..7ef38ff06 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -86,7 +86,7 @@ asprintf(char **buffer, const char *format, ...)
 		return -1;
 	size++;
 
-	*buffer = malloc(size);
+	*buffer = (char *)malloc(size);
 	if (*buffer == NULL)
 		return -1;
 
diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index bf715896a..c20be29b1 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -47,7 +47,7 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
 
 static inline int
 eth_dev_pci_specific_init(struct rte_eth_dev *eth_dev, void *bus_device) {
-	struct rte_pci_device *pci_dev = bus_device;
+	struct rte_pci_device *pci_dev = (struct rte_pci_device *)bus_device;
 
 	if (!pci_dev)
 		return -ENODEV;
-- 
2.29.0.vfs.0.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-01-17 19:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12  1:18 [dpdk-dev] [PATCH] eal/headers: explicitly cast void * to type * Tyler Retzlaff
2021-01-13 17:52 ` Dmitry Kozlyuk
2021-01-14  5:45   ` Tyler Retzlaff
2021-01-14  7:05     ` Dmitry Kozlyuk
2021-01-14 10:55       ` Bruce Richardson
2021-01-14 18:27         ` Dmitry Kozlyuk
2021-01-14 18:49           ` Thomas Monjalon
2021-01-15 19:21         ` Tyler Retzlaff
2021-01-17 17:13           ` Thomas Monjalon
2021-01-15 19:38 ` [dpdk-dev] [PATCH v2] eal/windows: " Tyler Retzlaff
2021-01-17 17:19   ` Thomas Monjalon
2021-01-17 18:10   ` Stephen Hemminger
2021-01-17 19:51     ` Dmitry Kozlyuk

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).