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 66121A00C2; Thu, 5 Jan 2023 17:10:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5855A42D38; Thu, 5 Jan 2023 17:10:42 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 102364021E; Thu, 5 Jan 2023 17:10:41 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9BABA5C0172; Thu, 5 Jan 2023 11:10:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 05 Jan 2023 11:10:40 -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=fm2; t=1672935040; x=1673021440; bh=QN 6Am80DuS29IzYzy2Jw8Xre3qiy6dVzwF1PQLBRuMk=; b=Iljrt5M31XgkzWQVVC pd39mXxYWlZg0Upb7uPIDAnuUZxGV9E0byyfQOz6HnJjOvefU9Dxyc86/jyYRupP IQWpmXd8PUqqnOAlDU5KdAIu7CiQsf3fksUb1GMigT9o1Dqu6pJ/rBphdubKG9PK XWuZNK9uYHhOrUu7U+e71h+uxf7tZ24PglfsilE/hL1LovDzn0E/InY52tfc1NZs 8y4JoTEKi7TqcBJ/HrnlUvDM0+ZSVADbzJh60XLcR/mtvY21cZri4eHT41ZC41tn n1wQ2INYBxp08O2QOs8iJ+hdrpgHWWhVLvA+AUTiiaM6LiX6MdNz/DpASBEhUTVr PDog== 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=fm2; t=1672935040; x=1673021440; bh=QN6Am80DuS29I zYzy2Jw8Xre3qiy6dVzwF1PQLBRuMk=; b=mFGN41il9ELZhTNhSBRPdVnmP8rLa oatW+BvUlqenmUqBcasyTO3DXSY6Z+2OVTsUmo7r9uH6XsTK21zQgZe/U4DeXnqa My/wU2muHEWiVoihn5LhhAGRNbHco99gtsQWFQ7CQRDou2VZTmksseTcc8fDn7hD bI6eZ+QOgk/QetBuAoGuACom3cqlr0ihzyYxpzsESxJhio/+gmYdbFNS1lOKhs/m kNvGTjEWHL/atNBYu6s2EiBM18iUCJJIOE/5GEvT1PjS5KPxU+/qcbJECuSkdvU0 B/9og5yAKC2Gfpq9rbv+DAxOCL6ikqZBwsyRh6V6I1kjXypf+niQnLb7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeekgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdejhfdugeehvddtieejieegteeuudfgjeeukeeiledthfetveek hefhieelhfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 Jan 2023 11:10:38 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Tal Shnaiderman , stable@dpdk.org, Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Narcisa Vasile <"navasile@linux.microsoft.comnavasile"@microsoft.com>, Bruce Richardson , Keith Wiles Subject: [PATCH 1/3] eal/windows: fix pedantic build Date: Thu, 5 Jan 2023 17:10:18 +0100 Message-Id: <20230105161020.247780-2-thomas@monjalon.net> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230105161020.247780-1-thomas@monjalon.net> References: <20230105161020.247780-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 --- 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