From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B572A2EFC for ; Tue, 15 Oct 2019 15:35:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8A6541EBFD; Tue, 15 Oct 2019 15:35:37 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DA0BA1EBDB for ; Tue, 15 Oct 2019 15:35:28 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Oct 2019 06:35:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,300,1566889200"; d="scan'208";a="195280698" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga007.fm.intel.com with ESMTP; 15 Oct 2019 06:35:27 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: jerinjacobk@gmail.com, bluca@debian.org, Bruce Richardson Date: Tue, 15 Oct 2019 14:35:09 +0100 Message-Id: <20191015133513.11376-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191015133513.11376-1-bruce.richardson@intel.com> References: <20191014113448.7442-1-bruce.richardson@intel.com> <20191015133513.11376-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 3/7] examples/performance-thread: remove warning disabling 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" 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 --- 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