From mboxrd@z Thu Jan 1 00:00:00 1970 From: Reshma Pattan Subject: [PATCH] examples/quota_watermark: fix gcc 8.0.1 cast between incompatible types Date: Wed, 9 May 2018 12:35:28 +0100 Message-ID: <1525865729-16086-2-git-send-email-reshma.pattan@intel.com> References: <1525865729-16086-1-git-send-email-reshma.pattan@intel.com> Cc: stable@dpdk.org, Reshma Pattan To: dev@dpdk.org Return-path: In-Reply-To: <1525865729-16086-1-git-send-email-reshma.pattan@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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