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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Mar 15 23:45:52 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/17/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://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0ccc2b5cf0ade8a6e64fef7ac9edd13e052e6ffe

Thanks.

Luca Boccassi

---
>From 0ccc2b5cf0ade8a6e64fef7ac9edd13e052e6ffe 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

[ 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/librte_eal/windows/include/pthread.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/windows/include/pthread.h b/lib/librte_eal/windows/include/pthread.h
index 27fd2cca52..f7cf0e9ddf 100644
--- a/lib/librte_eal/windows/include/pthread.h
+++ b/lib/librte_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.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-03-15 22:44:49.711012572 +0000
+++ 0001-eal-windows-fix-pedantic-build.patch	2023-03-15 22:44:49.463847745 +0000
@@ -1 +1 @@
-From 4ef69b2877a24ddb89afaf4bb6f4e73bb52a605b Mon Sep 17 00:00:00 2001
+From 0ccc2b5cf0ade8a6e64fef7ac9edd13e052e6ffe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4ef69b2877a24ddb89afaf4bb6f4e73bb52a605b ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
- lib/eal/windows/include/pthread.h | 3 ++-
+ lib/librte_eal/windows/include/pthread.h | 3 ++-
@@ -26 +27 @@
-diff --git a/lib/eal/windows/include/pthread.h b/lib/eal/windows/include/pthread.h
+diff --git a/lib/librte_eal/windows/include/pthread.h b/lib/librte_eal/windows/include/pthread.h
@@ -28,2 +29,2 @@
---- a/lib/eal/windows/include/pthread.h
-+++ b/lib/eal/windows/include/pthread.h
+--- a/lib/librte_eal/windows/include/pthread.h
++++ b/lib/librte_eal/windows/include/pthread.h


More information about the stable mailing list