patch 'eal/windows: fix pedantic build' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Sun Apr 9 17:23:11 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/11/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/300d83b989758cd2f85c206b578d207072ce178e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 300d83b989758cd2f85c206b578d207072ce178e Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Thu, 5 Jan 2023 16:18:38 +0100
Subject: [PATCH] eal/windows: fix pedantic build
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 4ef69b2877a24ddb89afaf4bb6f4e73bb52a605b ]

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,
     |                                 ^

By using uintptr_t, the compiler is forced to accept the conversion.

Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
---
 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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-04-09 21:45:38.923433700 +0800
+++ 0003-eal-windows-fix-pedantic-build.patch	2023-04-09 21:45:38.569042200 +0800
@@ -1 +1 @@
-From 4ef69b2877a24ddb89afaf4bb6f4e73bb52a605b Mon Sep 17 00:00:00 2001
+From 300d83b989758cd2f85c206b578d207072ce178e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 4ef69b2877a24ddb89afaf4bb6f4e73bb52a605b ]
@@ -18 +20,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list