DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] eal: fix missing type in dtor macro expansion
@ 2024-04-16 16:33 Tyler Retzlaff
  2024-04-16 18:16 ` Morten Brørup
  0 siblings, 1 reply; 3+ messages in thread
From: Tyler Retzlaff @ 2024-04-16 16:33 UTC (permalink / raw)
  To: dev; +Cc: Tyler Retzlaff, stable

RTE_FINI expansion failed to specify void * type for storage of
destructor function pointer resulting it defaulting to type ``int``.

Update the macro to specify ``void *`` as the type so the correct size
is allocated in the segment.

Fixes: 64eff943ca82 ("eal: implement constructors for MSVC")
Cc: roretzla@linux.microsoft.com
Cc: stable@dpdk.org

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/eal/include/rte_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eal/include/rte_common.h b/lib/eal/include/rte_common.h
index 298a5c6..618ed56 100644
--- a/lib/eal/include/rte_common.h
+++ b/lib/eal/include/rte_common.h
@@ -291,7 +291,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
 #define RTE_FINI_PRIO(name, priority) \
 	static void name(void); \
 	__pragma(const_seg(DTOR_PRIORITY_TO_SECTION(priority))) \
-	__declspec(allocate(DTOR_PRIORITY_TO_SECTION(priority))) name ## _pointer = &name; \
+	__declspec(allocate(DTOR_PRIORITY_TO_SECTION(priority))) void *name ## _pointer = &name; \
 	__pragma(const_seg()) \
 	static void name(void)
 #endif
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-16 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16 16:33 [PATCH] eal: fix missing type in dtor macro expansion Tyler Retzlaff
2024-04-16 18:16 ` Morten Brørup
2024-05-16 17:15   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).