DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: jerinjacobk@gmail.com, bluca@debian.org,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH v2 3/7] examples/performance-thread: remove warning disabling
Date: Tue, 15 Oct 2019 14:35:09 +0100	[thread overview]
Message-ID: <20191015133513.11376-4-bruce.richardson@intel.com> (raw)
In-Reply-To: <20191015133513.11376-1-bruce.richardson@intel.com>

The warnings about functions not returning values can be removed from the
code by just adding an attribute to the function to specifies it doesn't
return. The GCC bug referenced in the makefile which prevents this from
working has been fixed for >10 years according to bugzilla.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/performance-thread/l3fwd-thread/Makefile | 6 ------
 examples/performance-thread/l3fwd-thread/main.c   | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/Makefile b/examples/performance-thread/l3fwd-thread/Makefile
index 1a1c95829..b14b21e30 100644
--- a/examples/performance-thread/l3fwd-thread/Makefile
+++ b/examples/performance-thread/l3fwd-thread/Makefile
@@ -20,10 +20,4 @@ include $(RTE_SDK)/examples/performance-thread/common/common.mk
 
 CFLAGS += -O3 -g $(USER_FLAGS) $(INCLUDES) $(WERROR_FLAGS)
 
-# workaround for a gcc bug with noreturn attribute
-# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
-#ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
-CFLAGS_main.o += -Wno-return-type
-#endif
-
 include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 122c63244..ad540fd84 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -1877,7 +1877,7 @@ process_burst(struct rte_mbuf *pkts_burst[MAX_PKT_BURST], int nb_rx,
 /*
  * CPU-load stats collector
  */
-static int
+static int __attribute__((noreturn))
 cpu_load_collector(__rte_unused void *arg) {
 	unsigned i, j, k;
 	uint64_t hits;
@@ -2299,7 +2299,7 @@ sched_spawner(__rte_unused void *arg) {
 }
 
 /* main processing loop */
-static int
+static int __attribute__((noreturn))
 pthread_tx(void *dummy)
 {
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
-- 
2.21.0


  parent reply	other threads:[~2019-10-15 13:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 11:34 [dpdk-dev] [PATCH 0/8] support all examples in a meson build Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 1/8] examples/bpf: remove from list of examples to build Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 2/8] examples/ethtool: allow building as part of meson build Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 3/8] examples/performance-thread: remove warning disabling Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 4/8] examples/performance-thread: rename directory to standard Bruce Richardson
2019-10-14 16:16   ` Jerin Jacob
2019-10-14 16:41     ` Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 5/8] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 6/8] examples/performance-thread: add pthread shim " Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 7/8] examples/server_node_efd: add node binary to meson build Bruce Richardson
2019-10-14 11:34 ` [dpdk-dev] [PATCH 8/8] examples/server_node_efd: add server " Bruce Richardson
2019-10-15 13:35 ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 1/7] examples/bpf: remove from list of examples to build Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 2/7] examples/ethtool: allow building as part of meson build Bruce Richardson
2019-10-15 13:35   ` Bruce Richardson [this message]
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 4/7] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 5/7] examples/performance-thread: add pthread shim " Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 6/7] examples/server_node_efd: add node binary to meson build Bruce Richardson
2019-10-15 13:35   ` [dpdk-dev] [PATCH v2 7/7] examples/server_node_efd: add server " Bruce Richardson
2019-10-16 11:47   ` [dpdk-dev] [PATCH v2 0/7] support all examples in a " Luca Boccassi
2019-10-22 15:43 ` [dpdk-dev] [PATCH v3 0/9] " Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 1/9] examples/bpf: remove from list of examples to build Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 2/9] examples/ethtool: allow building as part of meson build Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 3/9] examples/performance-thread: remove warning disabling Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 4/9] examples/performance-thread: add l3fwd-thread to meson Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 5/9] examples/performance-thread: add pthread shim " Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 6/9] examples/server_node_efd: add node binary to meson build Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 7/9] examples/server_node_efd: add server " Bruce Richardson
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 8/9] examples/guest_cli: fix type of cmdline token Bruce Richardson
2019-10-23 10:40     ` Hunt, David
2019-10-22 15:43   ` [dpdk-dev] [PATCH v3 9/9] examples/guest_cli: add power manager guest cli to meson Bruce Richardson
2019-10-23 10:38     ` Hunt, David
2019-10-27 16:28   ` [dpdk-dev] [PATCH v3 0/9] support all examples in a meson build 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=20191015133513.11376-4-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    --cc=jerinjacobk@gmail.com \
    /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).