From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8AB80423BA; Thu, 12 Jan 2023 21:37:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7F03042D9F; Thu, 12 Jan 2023 21:37:32 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 237E642D9A; Thu, 12 Jan 2023 21:37:31 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 87F7C320092B; Thu, 12 Jan 2023 15:37:29 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 12 Jan 2023 15:37:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1673555849; x=1673642249; bh=LA xu4eKVQEPPrkSFqAOs0e9qIozyyOOINnsDkyq8hbc=; b=AETnwAx3r+25cUn3fl dpqU4DSSjn0ZEVKe8nr5wDvHAMAtj41wf+xfaw/VMOb+sFKVGBeCsuRBI18ZeA8Q ylv7AQDDW0sZcublgVfD+9jKuvWWSoIofa6q6sGxydWXblGMiiyIVkaue9YvLK1u AsEaRd4qWvhaib9CEJosOoLR/zFa65XT+yVGX0G5Ag2sLHmQ+Gzokd8ljZqPnZlt m5ysioEapOEboReRbaybQO9hQ1MMjpRIQeaw3Q2oncj4pTsPa6Z6Vwz9yFzDzx0B Ky2vxuyq2um4bZszFEQ449gtzoIIUDVxH4nHn/Rb4JTy8/fhfulcKomMOU7sGoEG 78yA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1673555849; x=1673642249; bh=LAxu4eKVQEPPr kSFqAOs0e9qIozyyOOINnsDkyq8hbc=; b=owgy4x++EyUBtpBUz6cNqMqg3PNel UH7dufVAFntt/6bA0Y7xfYfa1ZWX3mySM6lbgJnABQfp1RGF68y3Rce561HBiQN6 p+XSMphyo7vINJmzb8IotP/1qwn1XQ+yZ11MGsQbHuM8dwfYmRPMANnVpM8IkpQC RwQ+F6a0W8OR1VS+igQKatQxRXSCo5d59GHzP1TEHhrUNUy6kERsDh32QL/aZgFA ZH3cj4IqVmXckEVI0QejzAqxZxKqbI4lkLaydaF3ZGbP0QgwR48cvEBzhtKrqLCG o1HpGlC2PUnL4GVVeD7NZWxPADPUjRXvyLXYUAgC/hTsWX45KSghNsFWw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleeigddugedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvjefhudeghedvtdeijeeigeetuedugfejueekieeltdfhteev keehhfeilefhtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Jan 2023 15:37:27 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Tal Shnaiderman , stable@dpdk.org, Tyler Retzlaff , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Bruce Richardson , Ranjit Menon , Keith Wiles Subject: [PATCH v2 1/4] eal/windows: fix pedantic build Date: Thu, 12 Jan 2023 21:37:15 +0100 Message-Id: <20230112203719.1528619-2-thomas@monjalon.net> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112203719.1528619-1-thomas@monjalon.net> References: <20230105161020.247780-1-thomas@monjalon.net> <20230112203719.1528619-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org MinGW GCC 12 shows an illegal pointer conversion when included in a pedantic module: lib/eal/windows/include/pthread.h:137:41: error: ISO C forbids conversion of object pointer to function pointer type [-Werror=pedantic] 137 | hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)threadfunc, | ^ Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros") Cc: stable@dpdk.org By using uintptr_t, the compiler is forced to accept the conversion. Signed-off-by: Thomas Monjalon Acked-by: Tyler Retzlaff --- lib/eal/windows/include/pthread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/eal/windows/include/pthread.h b/lib/eal/windows/include/pthread.h index 27fd2cca52..f7cf0e9ddf 100644 --- a/lib/eal/windows/include/pthread.h +++ b/lib/eal/windows/include/pthread.h @@ -134,7 +134,8 @@ pthread_create(void *threadid, const void *threadattr, void *threadfunc, { RTE_SET_USED(threadattr); HANDLE hThread; - hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)threadfunc, + hThread = CreateThread(NULL, 0, + (LPTHREAD_START_ROUTINE)(uintptr_t)threadfunc, args, 0, (LPDWORD)threadid); if (hThread) { SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); -- 2.39.0