DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test: fix incorrect cast in pipeline unit test
@ 2018-05-10  7:38 David Hunt
  2018-05-10 15:25 ` Pattan, Reshma
  2018-05-11 15:42 ` De Lara Guarch, Pablo
  0 siblings, 2 replies; 4+ messages in thread
From: David Hunt @ 2018-05-10  7:38 UTC (permalink / raw)
  To: dev; +Cc: cristian.dumitrescu, David Hunt

New warning with gcc 8.1:
The table_action_stub_miss() function was incorrectly
declared as returning a typedef of
rte_pipeline_table_action_handler_miss, instead of what it
should have been, an int.
Changed this to declare the function as returning an int, and
now when the action_handler_miss is set to table_action_stub_miss
(cast as rte_pipeline_table_action_handler_miss), gcc 8.1 no
longer complains about the cast.

Fixes: 5205954791cb ("app/test: packet framework unit tests")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 test/test/test_table_pipeline.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test/test_table_pipeline.c b/test/test/test_table_pipeline.c
index 055a1a4e7..5ec4c5244 100644
--- a/test/test/test_table_pipeline.c
+++ b/test/test/test_table_pipeline.c
@@ -69,7 +69,7 @@ rte_pipeline_table_action_handler_hit
 table_action_stub_hit(struct rte_pipeline *p, struct rte_mbuf **pkts,
 	uint64_t pkts_mask, struct rte_pipeline_table_entry **entry, void *arg);
 
-rte_pipeline_table_action_handler_miss
+static int
 table_action_stub_miss(struct rte_pipeline *p, struct rte_mbuf **pkts,
 	uint64_t pkts_mask, struct rte_pipeline_table_entry **entry, void *arg);
 
@@ -101,7 +101,7 @@ table_action_stub_hit(__attribute__((unused)) struct rte_pipeline *p,
 	return 0;
 }
 
-rte_pipeline_table_action_handler_miss
+static int
 table_action_stub_miss(struct rte_pipeline *p,
 	__attribute__((unused)) struct rte_mbuf **pkts,
 	uint64_t pkts_mask,
-- 
2.17.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-13 21:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10  7:38 [dpdk-dev] [PATCH] test: fix incorrect cast in pipeline unit test David Hunt
2018-05-10 15:25 ` Pattan, Reshma
2018-05-11 15:42 ` De Lara Guarch, Pablo
2018-05-13 21:25   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).