From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [PATCH v4 08/23] rte_mbuf.h: avoid warnings from inadvertant promotion Date: Thu, 17 May 2018 10:30:03 +0200 Message-ID: <20180517083003.ivf23rsx3jdsp7xi@glumotte.dev.6wind.com> References: <152627436523.53156.4398253089110011263.stgit@localhost.localdomain> <152627460777.53156.11504596034019576578.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Andy Green Return-path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 7DDC94CA5 for ; Thu, 17 May 2018 10:30:17 +0200 (CEST) Content-Disposition: inline In-Reply-To: <152627460777.53156.11504596034019576578.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" On Mon, May 14, 2018 at 01:10:07PM +0800, Andy Green wrote: > "1 + value", where value is an uint16_t causes promotion > to a signed int. The compiler complained that we are > shoving an int into a uint16_t return type with different > size and sign. > > Bumping and returning value directly instead removes the > promotion and the problem. > > Signed-off-by: Andy Green Acked-by: Olivier Matz