From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] examples: fix typdef in performance thread app Date: Sun, 13 May 2018 23:37:29 +0200 Message-ID: <2310860.D1JZ3WaQXe@xps> References: <20180510053112.25491-1-david.hunt@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, john.mcnamara@intel.com To: David Hunt Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 536071B86F for ; Sun, 13 May 2018 23:37:32 +0200 (CEST) In-Reply-To: <20180510053112.25491-1-david.hunt@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" 10/05/2018 07:31, David Hunt: > The function pthread_create() expects void *(*func) (void *) > for function pointer, however, lthread_func_t was defined as > void (*func) (void *), so now gcc 8.1 warns that the cast is > incorrect, causing a compilation failure. This patch changes > the declaration of lthread_func_t from returning a void to > returning a void*, and then changes the sample app in the > relevant places that are affected by the typedef change. > > Fixes: 116819b9ed0d ("examples/performance-thread: add lthread subsystem") > > Signed-off-by: David Hunt > --- [...] > -static void initial_lthread(void *args); > -static void initial_lthread(void *args __attribute__((unused))) > +static void *initial_lthread(void *args); This declaration can be removed. > +static void *initial_lthread(void *args __attribute__((unused))) > { The function must return a pointer (like NULL) at the end. Please check that all threads are returning something.