From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 107BA1C725 for ; Mon, 14 May 2018 12:00:10 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2018 03:00:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,399,1520924400"; d="scan'208";a="228332260" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.221.65]) ([10.237.221.65]) by fmsmga006.fm.intel.com with ESMTP; 14 May 2018 03:00:09 -0700 To: Thomas Monjalon Cc: "dev@dpdk.org" , "Mcnamara, John" References: <20180510053112.25491-1-david.hunt@intel.com> <2310860.D1JZ3WaQXe@xps> From: "Hunt, David" Message-ID: <2f3f544a-d7f0-db1e-74db-8d6972ea34fb@intel.com> Date: Mon, 14 May 2018 11:01:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <2310860.D1JZ3WaQXe@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH] examples: fix typdef in performance thread app 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: , X-List-Received-Date: Mon, 14 May 2018 10:00:11 -0000 Hi Thomas, On 13/5/2018 10:37 PM, Thomas Monjalon wrote: > 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. > Sure, Thomas, I've made updates based on your suggestions and pushed up a v2. Rgds, Dave.