From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id BE8181BB18 for ; Thu, 10 May 2018 16:39:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2018 07:39:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,385,1520924400"; d="scan'208";a="227393694" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.222.32]) by fmsmga005.fm.intel.com with ESMTP; 10 May 2018 07:39:10 -0700 From: David Hunt To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, David Hunt Date: Thu, 10 May 2018 08:38:15 +0100 Message-Id: <20180510073815.76926-1-david.hunt@intel.com> X-Mailer: git-send-email 2.17.0 Subject: [dpdk-dev] [PATCH] test: fix incorrect cast in pipeline unit test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2018 14:39:13 -0000 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 --- 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