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 48F0545E6F; Wed, 11 Dec 2024 03:06:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1492940653; Wed, 11 Dec 2024 03:06:22 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B106A40615 for ; Wed, 11 Dec 2024 03:06:15 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id D0B7F204722D; Tue, 10 Dec 2024 18:06:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D0B7F204722D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733882774; bh=2GgV0YkZh1eB035IK7enqipGoEEaP1VUxdQI002wu/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G/HdUxHVIeTFLza8DFZarnNGgMmNAgG6aMux+2jYqfR346+INsx+Xuzb8vZjbljqu scjNghj/Gi6Cce/kRfLUF4SiKBslzMTwupnySRPZ6wEn42wNDTFqSCf5G3mXnw2BAn KFEbtTnFnQg8GyFwaQ7w9xGJKsGJn+LzKQ3wYB+U= From: Andre Muezerie To: Aman Singh Cc: dev@dpdk.org, Andre Muezerie Subject: [PATCH 04/21] app/test-pmd: use portable variadic macros Date: Tue, 10 Dec 2024 18:05:34 -0800 Message-Id: <1733882751-29598-5-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> References: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Many places are using a GCC extension related to variadic macros, where a name prepends the ellipsis. This results in a warning like the one below when compiling the code with MSVC: app\test-pmd\testpmd.h(1314): error C2608: invalid token '...' in macro parameter list Variadic macros became a standard part of the C language with C99. GCC, Clang and MSVC handle them properly. The fix is to remove the prefix name (args... becomes ...) and use __VA_ARGS__. Signed-off-by: Andre Muezerie --- app/test-pmd/testpmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 314482e69c..260e4761bd 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1311,7 +1311,7 @@ RTE_INIT(__##c) \ #endif #endif /* __GCC__ */ -#define TESTPMD_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, testpmd_logtype, "testpmd: " fmt, ## args) +#define TESTPMD_LOG(level, fmt, ...) \ + rte_log(RTE_LOG_ ## level, testpmd_logtype, "testpmd: " fmt, ## __VA_ARGS__) #endif /* _TESTPMD_H_ */ -- 2.47.0.vfs.0.3