From patchwork Thu May 10 01:25:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hunt, David" X-Patchwork-Id: 39717 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDB5A1B97A; Thu, 10 May 2018 10:26:48 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D202D1B971 for ; Thu, 10 May 2018 10:26:47 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2018 01:26:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,384,1520924400"; d="scan'208";a="54705504" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.222.32]) by orsmga001.jf.intel.com with ESMTP; 10 May 2018 01:26:45 -0700 From: David Hunt To: dev@dpdk.org Cc: bruce.richardson@intel.com, david.hunt@intel.com Date: Thu, 10 May 2018 02:25:38 +0100 Message-Id: <20180510012538.176757-1-david.hunt@intel.com> X-Mailer: git-send-email 2.17.0 Subject: [dpdk-dev] [PATCH] test: fix incorrect cast in distributor 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" New warning with gcc 8.1: When casting the function pointer passed to rte_eal_remote_launch() as an lcore_function_t *, it expects the cast function to return an int, but instead it was returning void. Fixed to return an int. Fixes: c3eabff124e6 ("distributor: add unit tests") Signed-off-by: David Hunt Acked-by: Pablo de Lara --- test/test/test_distributor_perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test/test_distributor_perf.c b/test/test/test_distributor_perf.c index 557715e13..edf1998ab 100644 --- a/test/test/test_distributor_perf.c +++ b/test/test/test_distributor_perf.c @@ -31,7 +31,7 @@ struct worker_stats worker_stats[RTE_MAX_LCORE]; * worker thread used for testing the time to do a round-trip of a cache * line between two cores and back again */ -static void +static int flip_bit(volatile uint64_t *arg) { uint64_t old_val = 0; @@ -41,6 +41,7 @@ flip_bit(volatile uint64_t *arg) old_val = *arg; *arg = 0; } + return 0; } /*