[dpdk-dev] [PATCH v6 4/8] rte_mbuf.h: reduce temp to match uint16 types

Bruce Richardson bruce.richardson at intel.com
Mon May 21 14:14:34 CEST 2018


On Mon, May 21, 2018 at 10:01:13AM +0800, Andy Green wrote:
>     /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 <andy at warmcat.com>
> ---
>  lib/librte_mbuf/rte_mbuf.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the dev mailing list