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 6CA5245E6F; Wed, 11 Dec 2024 03:07:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 593CF40697; Wed, 11 Dec 2024 03:06:34 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4808D4064A for ; Wed, 11 Dec 2024 03:06:17 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 07D27204722E; Tue, 10 Dec 2024 18:06:17 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 07D27204722E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733882777; bh=GC5hZ5NDeikC+8B2hADgkMaPfAUrkxjKROMH7V6Dyj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SqBR5xI1E9yVt8KI+bD+3qNntNfEhwleGDO0wdiMtk9R8TJTUbuoe8Ab5K8rRZNia esUZ1ZHKD6SQUxnoF+XEb4Tpmbewbg6z9lw6/vxeyBs3W8y6GMMCfYHgpti765hy0H 9vvMhTul70OlTiiXWBm16B6fEvGEdfKr7oYeWrDA= From: Andre Muezerie To: Cc: dev@dpdk.org, Andre Muezerie Subject: [PATCH 15/21] drivers/vdpa: use portable variadic macros Date: Tue, 10 Dec 2024 18:05:45 -0800 Message-Id: <1733882751-29598-16-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 --- drivers/vdpa/ifc/base/ifcvf_osdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/ifc/base/ifcvf_osdep.h b/drivers/vdpa/ifc/base/ifcvf_osdep.h index ba7d684c25..bbbde153ee 100644 --- a/drivers/vdpa/ifc/base/ifcvf_osdep.h +++ b/drivers/vdpa/ifc/base/ifcvf_osdep.h @@ -16,8 +16,8 @@ extern int ifcvf_vdpa_logtype; #define RTE_LOGTYPE_IFCVF_VDPA ifcvf_vdpa_logtype -#define WARNINGOUT(S, args...) RTE_LOG(WARNING, IFCVF_VDPA, S, ##args) -#define DEBUGOUT(S, args...) RTE_LOG(DEBUG, IFCVF_VDPA, S, ##args) +#define WARNINGOUT(S, ...) RTE_LOG(WARNING, IFCVF_VDPA, S, ##__VA_ARGS__) +#define DEBUGOUT(S, ...) RTE_LOG(DEBUG, IFCVF_VDPA, S, ##__VA_ARGS__) #define STATIC static #define msec_delay(x) rte_delay_us_sleep(1000 * (x)) -- 2.47.0.vfs.0.3