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 793D045E7C; Wed, 11 Dec 2024 23:07:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E824F40611; Wed, 11 Dec 2024 23:07:38 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0E618402A8 for ; Wed, 11 Dec 2024 23:07:33 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 22EDF20ACD6B; Wed, 11 Dec 2024 14:07:32 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 22EDF20ACD6B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733954852; bh=bWY/rlcRiIgOr8IGNJSuz1VmwD/+8KfkJxz5gs3pOOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a5KYmIDNmgit5gdKgRT3HBlehHww/kjiClBIi1evtJ2YVOfFowRPOl61t2Ri+cAhK bTJJV/abM1yFStJOymNwUUTAPC846kwUAD1zczoerlC6Gpq14n0UbZmuuT6qXdiVKP KPKpNyjssKNmnrftmbA8KzQN1fn1dPaE4vsGabpQ= From: Andre Muezerie To: dev@dpdk.org Cc: Andre Muezerie Subject: [PATCH v2 01/14] app/test-acl: use portable variadic macros Date: Wed, 11 Dec 2024 14:07:11 -0800 Message-Id: <1733954844-24397-2-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1733954844-24397-1-git-send-email-andremue@linux.microsoft.com> References: <1733882751-29598-1-git-send-email-andremue@linux.microsoft.com> <1733954844-24397-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-acl/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-acl/main.c b/app/test-acl/main.c index 41ce83db08..3a791b3ccf 100644 --- a/app/test-acl/main.c +++ b/app/test-acl/main.c @@ -423,9 +423,9 @@ static const char cb_port_delim[] = ":"; static char line[LINE_MAX]; -#define dump_verbose(lvl, fh, fmt, args...) do { \ +#define dump_verbose(lvl, fh, fmt, ...) do { \ if ((lvl) <= (int32_t)config.verbose) \ - fprintf(fh, fmt, ##args); \ + fprintf(fh, fmt, ##__VA_ARGS__); \ } while (0) -- 2.47.0.vfs.0.3