summaryrefslogtreecommitdiff
path: root/lib/librte_mbuf
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2018-05-17 21:50:22 +0800
committerThomas Monjalon <thomas@monjalon.net>2018-05-21 00:21:19 +0200
commitc779ebdca0e4765158bd1eaa6f65c9d714605fae (patch)
tree402f639d0aedfb5ab27357882ea5b339ee0eab06 /lib/librte_mbuf
parent0298bfb26371ac31654444ea8494b30ceccc3b76 (diff)
downloaddpdk-c779ebdca0e4765158bd1eaa6f65c9d714605fae.zip
dpdk-c779ebdca0e4765158bd1eaa6f65c9d714605fae.tar.gz
dpdk-c779ebdca0e4765158bd1eaa6f65c9d714605fae.tar.xz
mbuf: explicit cast of size on detach
GCC 8.1 warned: In function 'rte_pktmbuf_detach': 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; ^~~~~~ Fixes: 355e6735b335 ("mbuf: fix cloning with private mbuf data") Cc: stable@dpdk.org Signed-off-by: Andy Green <andy@warmcat.com>
Diffstat (limited to 'lib/librte_mbuf')
-rw-r--r--lib/librte_mbuf/rte_mbuf.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index ae0fa4d..28fd4ad 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1579,7 +1579,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;