From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from core.dev.6wind.com (unknown [10.0.0.1]) by proxy.6wind.com (Postfix) with ESMTPS id 24DB6178D6B; Thu, 17 May 2018 10:27:07 +0200 (CEST) Received: from [10.16.0.195] (helo=6wind.com) by core.dev.6wind.com with smtp (Exim 4.84_2) (envelope-from ) id 1fJEIV-0002be-CA; Thu, 17 May 2018 10:30:04 +0200 Received: by 6wind.com (sSMTP sendmail emulation); Thu, 17 May 2018 10:30:03 +0200 Date: Thu, 17 May 2018 10:30:03 +0200 From: Olivier Matz To: Andy Green Cc: dev@dpdk.org 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 Content-Disposition: inline In-Reply-To: <152627460777.53156.11504596034019576578.stgit@localhost.localdomain> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v4 08/23] 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: Thu, 17 May 2018 08:30:17 -0000 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