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: roret...@linux.microsoft.com
Cc: sta...@dpdk.org

Signed-off-by: Tyler Retzlaff <roret...@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

Reply via email to