[dpdk-dev] [PATCH] eal/headers: explicitly cast void * to type *
Tyler Retzlaff
roretzla at linux.microsoft.com
Tue Jan 12 02:18:45 CET 2021
Explicitly cast void * to type * so that eal headers may be compiled
as C or C++.
Signed-off-by: Tyler Retzlaff <roretzla at 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
More information about the dev
mailing list