[dpdk-dev] rte_ethdev.h: fix gcc8.1 sign conversion warining
Checks
Commit Message
/projects/lagopus/src/dpdk/build/include/rte_ethdev.h: In function 'rte_eth_rx_queue_count':
/projects/lagopus/src/dpdk/build/include/rte_ethdev.h:3882:10: warning: conversion to 'int' from 'uint32_t' {aka 'unsigned int'} may change the sign of the result [-Wsign-conversion]
return (*dev->dev_ops->rx_queue_count)(dev, queue_id);
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Andy Green <andy@warmcat.com>
Fixes: 439a90b5f2 ("ethdev: reorder inline functions")
---
lib/librte_ethdev/rte_ethdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -3874,7 +3874,7 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
if (queue_id >= dev->data->nb_rx_queues)
return -EINVAL;
- return (*dev->dev_ops->rx_queue_count)(dev, queue_id);
+ return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
}
/**