From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ABF9743E86 for ; Tue, 16 Apr 2024 18:33:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A563E40268; Tue, 16 Apr 2024 18:33:28 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2D33340262; Tue, 16 Apr 2024 18:33:27 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 59AA120FC5F5; Tue, 16 Apr 2024 09:33:26 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 59AA120FC5F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1713285206; bh=Qru5OVbLt2qMRqjr0XB+SQDgFhS1kMEiaFu8mj5N2sw=; h=From:To:Cc:Subject:Date:From; b=LDADmYuCNd9xtbpJ1t2BrTd9J0DfPEfeNsYMHS+J9foVjMxR/TLBaPEgl0lW2X8LU J5p910vj6loTbHv0dG3B0j/URfw3vmEsoSlU//wZkcpPZeYG+QKn1Y5XuzjIPzVZDt UcYK6uj5uRFnlQSujrko2uzfXpesW2/pjtcAkf94= From: Tyler Retzlaff To: dev@dpdk.org Cc: Tyler Retzlaff , stable@dpdk.org Subject: [PATCH] eal: fix missing type in dtor macro expansion Date: Tue, 16 Apr 2024 09:33:24 -0700 Message-Id: <1713285204-5933-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 --- 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