From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 11/24] rte_mbuf.h: avoid warnings from inadvertant promotion Date: Sun, 13 May 2018 18:54:06 +0200 Message-ID: <54513581.bBxl9oTBcb@xps> References: <152609021699.121661.5295227351721865436.stgit@localhost.localdomain> <152609037755.121661.8441874507300238825.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Andy Green 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) In-Reply-To: <152609037755.121661.8441874507300238825.stgit@localhost.localdomain> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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?