From patchwork Tue Jan 12 01:18:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 86356 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E4D8A04B5; Tue, 12 Jan 2021 02:18:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44EAF140D61; Tue, 12 Jan 2021 02:18:52 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4C623140D5C for ; Tue, 12 Jan 2021 02:18:51 +0100 (CET) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 92DB320B6C40; Mon, 11 Jan 2021 17:18:50 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 92DB320B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1610414330; bh=ArZYVW09jYIVK0+dIhRDcxrY5pWbMZAdxZ2Bbs7dHmc=; h=From:To:Cc:Subject:Date:From; b=E5MZJ8xkZw0yEUJYB1eImyt+SVYX8kekWzyK1Wp2+YCgD061Fv0vjhMJvImQqf5V2 AgaZ6f+3O6J2MH5DEUpJ1FX9Seys09Vo0daknQmX/amqQ7K+RCB5jL/gc+LrhWTj3d oRygbFvByTq9hydb4BLzd+VdOywyxvxnS6nHHpf0= From: Tyler Retzlaff To: dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, navasile@linux.microsoft.com Date: Mon, 11 Jan 2021 17:18:45 -0800 Message-Id: <1610414325-9104-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] eal/headers: explicitly cast void * to type * X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Explicitly cast void * to type * so that eal headers may be compiled as C or C++. Signed-off-by: Tyler Retzlaff --- 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;