From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 56BFCAACE for ; Mon, 21 May 2018 04:01:17 +0200 (CEST) From: Andy Green To: dev@dpdk.org Cc: thomas@monjalon.net Date: Mon, 21 May 2018 10:01:13 +0800 Message-ID: <152686807337.58694.8171528630879404747.stgit@localhost.localdomain> In-Reply-To: <152686781484.58694.14737673447518527445.stgit@localhost.localdomain> References: <152686781484.58694.14737673447518527445.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [PATCH v6 4/8] rte_mbuf.h: reduce temp to match uint16 types 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: Mon, 21 May 2018 02:01:17 -0000 /projects/lagopus/src/dpdk/build/include/rte_mbuf.h: In function 'rte_pktmbuf_detach': /projects/lagopus/src/dpdk/build/include/rte_mbuf.h: 1583:17: warning: conversion from 'uint32_t' {aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] m->priv_size = priv_size; ^~~~~~~~~ The temp priv_size is declared as a uint32_t. But it only deals in uint16_t. m->priv_size is a uint16_t. Change it to a uint16_t. Fixes: 355e6735b3 ("mbuf: fix cloning with private mbuf data") Fixes: 1a60a0daa6 ("mbuf: fix segments number type increase") Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 28fd4ad52..76e37a2f8 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1571,7 +1571,8 @@ __rte_pktmbuf_free_direct(struct rte_mbuf *m) static inline void rte_pktmbuf_detach(struct rte_mbuf *m) { struct rte_mempool *mp = m->pool; - uint32_t mbuf_size, buf_len, priv_size; + uint32_t mbuf_size, buf_len; + uint16_t priv_size; if (RTE_MBUF_HAS_EXTBUF(m)) __rte_pktmbuf_free_extbuf(m);