mbuf: fix reference counter integer promotion
authorAndy Green <andy@warmcat.com>
Thu, 17 May 2018 13:49:27 +0000 (21:49 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 20 May 2018 22:20:28 +0000 (00:20 +0200)
commitee07d519ceb05e59dd970c48a42cf2f09b3ac4dc
treedb36ecafd8c0f88f6865679edbdd0e5b99790df9
parente8ed5056c8747cd5d95a41749e48987ad44dc9b3
mbuf: fix reference counter integer promotion

GCC 8.1 warned:

"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.

Fixes: f20b50b946da ("mbuf: optimize refcnt update")
Fixes: a53aa2b9f3be ("mbuf: support attaching external buffer")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf.h