Found by modified version of acll_cast.cocci lib/librte_pipeline/rte_pipeline.c:358:18-49: WARNING: casting value returned by memory allocation function to (struct rte_pipeline_table_entry *) is useless.
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org> --- lib/librte_pipeline/rte_pipeline.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pipeline/rte_pipeline.c b/lib/librte_pipeline/rte_pipeline.c index bd700d2..d56cfa7 100644 --- a/lib/librte_pipeline/rte_pipeline.c +++ b/lib/librte_pipeline/rte_pipeline.c @@ -355,8 +355,8 @@ rte_pipeline_table_create(struct rte_pipeline *p, /* Allocate space for the default table entry */ entry_size = sizeof(struct rte_pipeline_table_entry) + params->action_data_size; - default_entry = (struct rte_pipeline_table_entry *) rte_zmalloc_socket( - "PIPELINE", entry_size, RTE_CACHE_LINE_SIZE, p->socket_id); + default_entry = rte_zmalloc_socket("PIPELINE", entry_size, + RTE_CACHE_LINE_SIZE, p->socket_id); if (default_entry == NULL) { RTE_LOG(ERR, PIPELINE, "%s: Failed to allocate default entry\n", __func__); -- 2.1.4