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>
Acked-by: Luca Boccassi <bluca@debian.org>
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
/*
* CPU-load stats collector
*/
-static int
+static int __attribute__((noreturn))
cpu_load_collector(__rte_unused void *arg) {
unsigned i, j, k;
uint64_t hits;
}
/* main processing loop */
-static int
+static int __attribute__((noreturn))
pthread_tx(void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];