eal: fix missing type in dtor macro expansion
PATCH 1/1 eal: fix missing type in dtor macro expansion
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.
--- lib/eal/include/rte_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/eal/include/rte_common.h +1 -1
@@ -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
Signature · 1 line
1.8.3.1
Quoted 9 lines
From: Tyler Retzlaff [mailto:[email protected]]
Sent: Tuesday, 16 April 2024 18.33
RTE_FINIexpansion 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.
Quoted 6 lines
Signed-off-by Tyler Retzlaff <[email protected]>---
Thomas Monjalon
Applied16/04/2024 20:16, Morten Brørup:
Quoted 9 lines
Quoted 9 lines
From: Tyler Retzlaff [mailto:[email protected]]
Sent: Tuesday, 16 April 2024 18.33
RTE_FINIexpansion 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.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Tyler Retzlaff <[email protected]>Acked-by Morten Brørup <[email protected]>
Applied, thanks.