From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7D2DD1B1CC; Wed, 9 May 2018 13:35:36 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 04:35:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,381,1520924400"; d="scan'208";a="40432062" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by orsmga006.jf.intel.com with ESMTP; 09 May 2018 04:35:34 -0700 From: Reshma Pattan To: dev@dpdk.org Cc: stable@dpdk.org, Reshma Pattan Date: Wed, 9 May 2018 12:35:28 +0100 Message-Id: <1525865729-16086-2-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1525865729-16086-1-git-send-email-reshma.pattan@intel.com> References: <1525865729-16086-1-git-send-email-reshma.pattan@intel.com> Subject: [dpdk-stable] [PATCH] examples/quota_watermark: fix gcc 8.0.1 cast between incompatible types X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 11:35:37 -0000 Gcc 8.0.1 reports incompatible cast between types i.e. from `void (*)(void *)` to `(int (*)(void *)`. Change the pipeline_stage prototype to retun int type to fix the issue. Fixes: a0ffcb257a ("examples/quota_watermark: correct code indentation") CC: stable@dpdk.org Signed-off-by: Reshma Pattan --- examples/quota_watermark/qw/main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/quota_watermark/qw/main.c b/examples/quota_watermark/qw/main.c index 313216f39..dda3e0a3e 100644 --- a/examples/quota_watermark/qw/main.c +++ b/examples/quota_watermark/qw/main.c @@ -181,7 +181,7 @@ receive_stage(__attribute__((unused)) void *args) } } -static void +static int pipeline_stage(__attribute__((unused)) void *args) { int i, ret; @@ -243,9 +243,11 @@ pipeline_stage(__attribute__((unused)) void *args) } } } + + return 0; } -static void +static int send_stage(__attribute__((unused)) void *args) { uint16_t nb_dq_pkts; @@ -287,6 +289,8 @@ send_stage(__attribute__((unused)) void *args) /* TODO: Check if nb_dq_pkts == nb_tx_pkts? */ } } + + return 0; } int @@ -347,7 +351,7 @@ main(int argc, char **argv) init_ring(lcore_id, port_id); /* typecast is a workaround for GCC 4.3 bug */ - rte_eal_remote_launch((int (*)(void *))pipeline_stage, + rte_eal_remote_launch(pipeline_stage, NULL, lcore_id); } } -- 2.14.3