From: Reshma Pattan <reshma.pattan@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Reshma Pattan <reshma.pattan@intel.com>
Subject: [dpdk-stable] [PATCH] examples/quota_watermark: fix gcc 8.0.1 cast between incompatible types
Date: Wed, 9 May 2018 12:35:28 +0100 [thread overview]
Message-ID: <1525865729-16086-2-git-send-email-reshma.pattan@intel.com> (raw)
In-Reply-To: <1525865729-16086-1-git-send-email-reshma.pattan@intel.com>
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 <reshma.pattan@intel.com>
---
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
next prev parent reply other threads:[~2018-05-09 11:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 11:35 [dpdk-stable] [PATCH] examples/ipsec-secgw: replace strncpy with strlcpy Reshma Pattan
2018-05-09 11:35 ` Reshma Pattan [this message]
2018-05-11 15:48 ` [dpdk-stable] [PATCH] examples/quota_watermark: fix gcc 8.0.1 cast between incompatible types De Lara Guarch, Pablo
2018-05-13 21:45 ` Thomas Monjalon
2018-05-09 11:35 ` [dpdk-stable] [PATCH] examples/vhost_scsi: replace strncpy with strlcpy Reshma Pattan
2018-05-09 13:37 ` [dpdk-stable] [dpdk-dev] " Bruce Richardson
2018-05-09 16:38 ` Pattan, Reshma
2018-05-10 12:24 ` Pattan, Reshma
2018-05-10 12:05 ` [dpdk-stable] [PATCH v2] " Reshma Pattan
2018-05-10 13:31 ` Bruce Richardson
2018-05-13 21:50 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2018-05-09 13:35 ` [dpdk-stable] [dpdk-dev] [PATCH] examples/ipsec-secgw: " Bruce Richardson
2018-05-09 15:56 ` [dpdk-stable] [PATCH v2] " Reshma Pattan
2018-05-09 16:11 ` [dpdk-stable] [PATCH v3] " Reshma Pattan
2018-05-11 16:38 ` De Lara Guarch, Pablo
2018-05-13 21:52 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1525865729-16086-2-git-send-email-reshma.pattan@intel.com \
--to=reshma.pattan@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).