ring: remove signed type flip-flopping
authorAndy Green <andy@warmcat.com>
Thu, 17 May 2018 13:49:22 +0000 (21:49 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 20 May 2018 22:20:16 +0000 (00:20 +0200)
commite8ed5056c8747cd5d95a41749e48987ad44dc9b3
treead69b92e7d15b733284d5fbb70289af0d9819ad0
parent712a3db0b5b2c7e6380bdeb84b803bb0e0f97c15
ring: remove signed type flip-flopping

GCC 8.1 warns:

rte_ring.h:350:46:
warning: conversion to 'uint32_t' {aka 'unsigned int'}
from 'int' may change the sign of the result
[-Wsign-conversion]
  update_tail(&r->prod, prod_head, prod_next, is_sp, 1);

The visible apis take unsigned int, then call a private
api taking an int, which finally calls an api taking an
unsigned int.

Convert the private api to take unsigned int removing
5 x warning similar to that shown above.

Fixes: 0dfc98c507b1 ("ring: separate out head index manipulation")
Cc: stable@dpdk.org
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_ring/rte_ring.h
lib/librte_ring/rte_ring_c11_mem.h
lib/librte_ring/rte_ring_generic.h