From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by dpdk.org (Postfix) with ESMTP id 698C62B87 for ; Thu, 6 Apr 2017 16:00:04 +0200 (CEST) Received: by mail-qk0-f196.google.com with SMTP id k139so5953871qke.2 for ; Thu, 06 Apr 2017 07:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atomicrules-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J1ML0xMtovmtRCVobykLQBjr1ZmllHwfh1FZFwR8/VY=; b=OZJ03xsvhxSAtDLCMPeQKAKZJes1aAS6l9XOzFgaaruiw9NLetu5GB+cu/kVUd5Wpn 3rkTkNokZiG7DQ71WuCQ0it4vbDkTmuB1mdGYzRctreZE+LJ54W6pSi8Z1dVMW7tfdQn 4jjBZQAU0wRFnT6Zc92xObnI4bWq7mtRLmpARlm7S//X2QbjQymuClOUtRx9eqrexMJR EHqgiLiC3/Hmswko39ey1BAZWuJmhS62Zme1yk6Vrwuxci9GiN1nlhG2TWF3Vb2GP1nW TiLNYw5y6h+WGhOm49u7CElSlj3EyHtePq69giL4XOu8PaQxdBuAcnDLSedYk3M3ngaz ga1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J1ML0xMtovmtRCVobykLQBjr1ZmllHwfh1FZFwR8/VY=; b=Qc29mncMiRhBBnzwhOAfrkD0L7slqudAFd0d2235iSxDwJ8u6EdV9kvwQa33IRFUFa FaPu8ao44hAXwuqcsJGhuyOWL2v2p00mm9/CoyU66HTq146y8I4dqL/22oD6irjwXiDG 819QOdNt8lOQwQOLaT3oHQ0guD+5IP06QMyw1ZuAK+OkZtz4CsU7jh2Poowb8EDquJkY Xj/F5O6903SUmfvc9bWzaKJghpFANZ78mdAaQomIsaPcQpElcgub4sdivuVtei1ra6L/ mnygD32hnHqYc9r3yJ7Z1XruB+63VBCn4AKm6ncRoZRI9wHAecUZFHTY/kqz3YvlQesv +zhg== X-Gm-Message-State: AN3rC/4Hy9vBryBoCFpG56rxGmBlPfPHAKXrqWMM6+ijSEPa6KSXsPpFt0dv6MS5FoCZ6A== X-Received: by 10.55.55.67 with SMTP id e64mr6387864qka.262.1491487203830; Thu, 06 Apr 2017 07:00:03 -0700 (PDT) Received: from z170.home (pool-173-48-118-253.bstnma.fios.verizon.net. [173.48.118.253]) by smtp.gmail.com with ESMTPSA id m130sm984701qke.66.2017.04.06.07.00.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Apr 2017 07:00:03 -0700 (PDT) From: Ed Czeck To: dev@dpdk.org Cc: olivier.matz@6wind.com, bruce.richardson@intel.com, Ed Czeck Date: Thu, 6 Apr 2017 09:59:47 -0400 Message-Id: <1491487187-19577-1-git-send-email-ed.czeck@atomicrules.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] ring: use direct cast to objtype fixes build error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 14:00:04 -0000 build error: include/rte_ring.h:459:22: error: invalid conversion from ‘void*’ to ‘void**’ [-fpermissive] ENQUEUE_PTRS(r, &r[1], prod_head, obj_table, n, void *); Implicit casts of void* to void** are considered warnings in some compilers. E.g. g++ version 5.8. Cast directly to object types Signed-off-by: Ed Czeck --- lib/librte_ring/rte_ring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index 6642e18..7648cd8 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -290,7 +290,7 @@ void rte_ring_dump(FILE *f, const struct rte_ring *r); unsigned int i; \ const uint32_t size = (r)->size; \ uint32_t idx = prod_head & (r)->mask; \ - obj_type *ring = (void *)ring_start; \ + obj_type *ring = (obj_type *)ring_start; \ if (likely(idx + n < size)) { \ for (i = 0; i < (n & ((~(unsigned)0x3))); i+=4, idx+=4) { \ ring[idx] = obj_table[i]; \ @@ -321,7 +321,7 @@ void rte_ring_dump(FILE *f, const struct rte_ring *r); unsigned int i; \ uint32_t idx = cons_head & (r)->mask; \ const uint32_t size = (r)->size; \ - obj_type *ring = (void *)ring_start; \ + obj_type *ring = (obj_type *)ring_start; \ if (likely(idx + n < size)) { \ for (i = 0; i < (n & (~(unsigned)0x3)); i+=4, idx+=4) {\ obj_table[i] = ring[idx]; \ -- 2.7.4