From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id 6E5888D9F for ; Fri, 14 Aug 2015 10:33:18 +0200 (CEST) Received: by wijp15 with SMTP id p15so11861348wij.0 for ; Fri, 14 Aug 2015 01:33:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=AVYNUfpmh/zTCokkzegaErEX/zgxXiFI7gIq/jRowK0=; b=FcN2c+LW0Axr3rYGVab+oUVciaQdW5LuxeWKe4uNYuNmZ1pz7AIA71/uk5I++KtFTA 0Q0FKOJdO/MLuL7ledTKOYWKNfW5+rpFj5fvd7clBhIKrbv2Ey32ZzJA1Eww9PZMDFBA +Wc+++yLZEP/hgjWwXsXmUz/+EEtSmYwFsvCHe8luBPP3B0jlBDMkJsZLy0sZSGWZF+6 TVOUE4lSBu+38YTEMBk9rV7k5h+T6lVZCBlllC8yxARXUl5AuochsK0KzFcg9zMuwFng NNbWmTqvPkCoNQv3FTxhVkYnPLYBfhKm4kNJjHa7hy5fBdjXvb9i4gF3SIZEEdTsSau/ aVdw== X-Gm-Message-State: ALoCoQkJo7wxyT56Bi4CnKHhYDtj/zGft/D2RsJx3HznQRfyTAfgL7ZUSfQ2gNLQz+IPst9TbcW6 X-Received: by 10.180.12.148 with SMTP id y20mr4112109wib.80.1439541198160; Fri, 14 Aug 2015 01:33:18 -0700 (PDT) Received: from robocop.localdomain (bzq-109-64-134-34.red.bezeqint.net. [109.64.134.34]) by smtp.gmail.com with ESMTPSA id gj6sm1912183wib.22.2015.08.14.01.33.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2015 01:33:17 -0700 (PDT) From: Avi Kivity To: dev@dpdk.org Date: Fri, 14 Aug 2015 11:33:15 +0300 Message-Id: <1439541195-26630-1-git-send-email-avi@cloudius-systems.com> X-Mailer: git-send-email 2.4.3 Subject: [dpdk-dev] [PATCH] mbuf: fix incompatibility with C++ in header file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2015 08:33:18 -0000 C++ doesn't allow implied casting from void * to another pointer, so supply an explicit cast. Signed-off-by: Avi Kivity --- lib/librte_mbuf/rte_mbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index c3b8c98..8c2db1b 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -882,7 +882,7 @@ static inline uint16_t rte_pktmbuf_priv_size(struct rte_mempool *mp); static inline struct rte_mbuf * rte_mbuf_from_indirect(struct rte_mbuf *mi) { - return RTE_PTR_SUB(mi->buf_addr, sizeof(*mi) + mi->priv_size); + return (struct rte_mbuf *)RTE_PTR_SUB(mi->buf_addr, sizeof(*mi) + mi->priv_size); } /** -- 2.4.3