[dpdk-dev] [PATCH v3 11/24] rte_mbuf.h: avoid warnings from inadvertant promotion
Thomas Monjalon
thomas at monjalon.net
Sun May 13 18:54:06 CEST 2018
12/05/2018 03:59, Andy Green:
> @@ -836,8 +836,9 @@ rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value)
> * reference counter can occur.
> */
> if (likely(rte_mbuf_refcnt_read(m) == 1)) {
> - rte_mbuf_refcnt_set(m, 1 + value);
> - return 1 + value;
> + ++value;
> + rte_mbuf_refcnt_set(m, value);
> + return value;
> }
I don't understand what it is fixing.
Please could you explain or show the GCC warning?
More information about the dev
mailing list