From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 60E7D1CFE6 for ; Sun, 13 May 2018 18:54:08 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 08E58256F6; Sun, 13 May 2018 12:54:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 13 May 2018 12:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=mTnCX53d3ii9FHRc3nQj1isvQu /3m9o5091AW/LcR6E=; b=E1GR5SgXEPruZn2B1vOSQAA5fWCWQVfpm97ST1RIfh LSa4NTynQEcXpEwRYircwVuziDYZqb9HU1q7M+COorFSawLWMcIVKhn9aNiZZ1Hs HS1ZlKtPtBjiwKJE1Q5D20J6wlWJ98xo4tr/XSc38DaFmooIsTYqv8Ai4qBN8H5S w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=mTnCX5 3d3ii9FHRc3nQj1isvQu/3m9o5091AW/LcR6E=; b=FND5Jd5+/mPJz9Fm+DhDon O44Lrgs0UBficR6a264RAprijhTOvwPNuliFj6cXufQoata1TU38MEb0iwvOBtlx uydqtD4L3hP5l2Pk1/6riiwfDUwA+Nma7QTanCB6pAREfYEcxRmlL8JTZLgFp9fG dD/1nOAthPcbCZaJMj0ziG8/UGC5ocVmVdCGlf5PYJCOuUUEaV1ZfRAfEbOLhnjv gxfUIkxS6GHq3IvdDFkK1CDDbrQYYDJ4dQ4l/wXmA3OcXRt4QHyt2w3LDQtjSgT9 YOE3lCx0OQwQoL/IeRSDvlbYHKLqk3Ibl7hM+uMyCU1+J0xXAkEGgqLLV6ZT6bwQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 87307E4919; Sun, 13 May 2018 12:54:07 -0400 (EDT) From: Thomas Monjalon To: Andy Green Cc: dev@dpdk.org Date: Sun, 13 May 2018 18:54:06 +0200 Message-ID: <54513581.bBxl9oTBcb@xps> In-Reply-To: <152609037755.121661.8441874507300238825.stgit@localhost.localdomain> References: <152609021699.121661.5295227351721865436.stgit@localhost.localdomain> <152609037755.121661.8441874507300238825.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 11/24] rte_mbuf.h: avoid warnings from inadvertant promotion 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: Sun, 13 May 2018 16:54:08 -0000 12/05/2018 03:59, Andy Green: > @@ -836,8 +836,9 @@ rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value) > * reference counter can occur. > */ > if (likely(rte_mbuf_refcnt_read(m) == 1)) { > - rte_mbuf_refcnt_set(m, 1 + value); > - return 1 + value; > + ++value; > + rte_mbuf_refcnt_set(m, value); > + return value; > } I don't understand what it is fixing. Please could you explain or show the GCC warning?