From patchwork Thu May 17 13:50:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 40164 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DB48B7EC7; Thu, 17 May 2018 15:50:26 +0200 (CEST) Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 558B87D0E for ; Thu, 17 May 2018 15:50:26 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Thu, 17 May 2018 21:50:22 +0800 Message-ID: <152656502260.46638.1418691744379254369.stgit@localhost.localdomain> In-Reply-To: <152656480225.46638.3271983577765861155.stgit@localhost.localdomain> References: <152656480225.46638.3271983577765861155.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Subject: [dpdk-dev] [PATCH v5 18/21] rte_mbuf.h: explicit cast for size type to uint32 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" /projects/lagopus/src/dpdk/build/include/rte_mbuf.h: In function 'rte_pktmbuf_detach': /projects/lagopus/src/dpdk/build/include/rte_mbuf.h: 1580:14: warning: conversion from 'long unsigned int' to 'uint32_t' {aka 'unsigned int'} may change value [-Wconversion] mbuf_size = sizeof(struct rte_mbuf) + priv_size; ^~~~~~ Signed-off-by: Andy Green --- lib/librte_mbuf/rte_mbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 0580ec8a0..7849192c6 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1577,7 +1577,7 @@ static inline void rte_pktmbuf_detach(struct rte_mbuf *m) __rte_pktmbuf_free_direct(m); priv_size = rte_pktmbuf_priv_size(mp); - mbuf_size = sizeof(struct rte_mbuf) + priv_size; + mbuf_size = (uint32_t)(sizeof(struct rte_mbuf) + priv_size); buf_len = rte_pktmbuf_data_room_size(mp); m->priv_size = priv_size;