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 8A8F3A0C43 for ; Wed, 15 Sep 2021 21:25:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C94340E2D; Wed, 15 Sep 2021 21:25:19 +0200 (CEST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mails.dpdk.org (Postfix) with ESMTP id 675CF4003C; Wed, 15 Sep 2021 21:25:17 +0200 (CEST) Received: by mail-lf1-f48.google.com with SMTP id m3so6762467lfu.2; Wed, 15 Sep 2021 12:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4Ho9heTgT/LCazmaS2q+rH5hLSXSwN6t/hVled5q5sk=; b=XeWjEF6J+raaa6hRRp3AbiWQW4XlqhnZdqnoJY0Ncsjp/1Nr6SBdd9ZPsxpHFk6cef ac2Ls7rx0u+RG//otMt9XU/+5pPCL83QAvEs0fhW/6xJ1l+x4K5QVOF9Yttq/Co9NuyP Sh5UVb4fvB4Y8zoufIXMEqdHdOwpGWpV+CevzJI+1qqBFN8CRbUGoolXL1V9iozXWFn9 rrH3vAsdoruu1If3W/BIuJFl6LLdOjk1K+cX5eVZHsR8GC4dzj9+HkGnj1Xr3S5krQc4 0pKxyEjWLG1ybtzHeumxw0QcPtf0LD8cOG0tfWlYKfQEXXTX7rXT8m4gVGZ7q4qmKbRx bRaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4Ho9heTgT/LCazmaS2q+rH5hLSXSwN6t/hVled5q5sk=; b=qIoxpmtMuPjwlsxLTrcVhvEy//fFqtYvEqT9BmmbLm/FX6XqsB7QOdMJNLdjd1mmlI XxY7Q/I74M5FrZmn0MSW+n9F8IjtfB93RH92RJtFi0ieOXXTXwaT8qvK+YZSLLCejaDg 1nXeBn0PTuA2I0ZxQfpMggY4DyMbOKfbFW1LafSAlpxwugl7IsSF2LzIDyo+mfz+pQfx ZGz2LNy+8wtiWt0D1yO4gbVh54T+Jsv6ucBaUg9MNZ/ydUjHKB4jitoNNK2FFqgk24y4 /Jx/uAKsAoN+8cRTufXvzzHR0RtrLUyeV/EzaUjN6ORr9pJfmH1aXQGzHb6pIbXYgl// wTUQ== X-Gm-Message-State: AOAM533hwJrHIdZAINMHZtAe3+L1JpfUBzZXh5IjwQBhTExfjRGDPy+O KD2ALECVp+SnMODJL7hUrjY= X-Google-Smtp-Source: ABdhPJyD54pU6tNRCvI6u5CgjuODv37z5eTvDSexBp6Rv/QAUrzE3+G2MNdAMLJPco68xX5KGGgGGw== X-Received: by 2002:a2e:86d6:: with SMTP id n22mr1509721ljj.416.1631733916893; Wed, 15 Sep 2021 12:25:16 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id u13sm59053lft.132.2021.09.15.12.25.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 12:25:16 -0700 (PDT) Date: Wed, 15 Sep 2021 22:25:14 +0300 From: Dmitry Kozlyuk To: Tal Shnaiderman Cc: , , , , , Message-ID: <20210915222514.259bc13b@sovereign> In-Reply-To: <20210913165500.21636-1-talshn@nvidia.com> References: <20210913165500.21636-1-talshn@nvidia.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] eal/windows: fix token pasting build warning 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 Sender: "stable" 2021-09-13 19:55 (UTC+0300), Tal Shnaiderman: > When building DPDK on Windows in debug mode the following > warning appear: > > warning: token pasting of ',' and __VA_ARGS__ is a GNU extension > [-Wgnu-zero-variadic-macro-arguments] #define open(path, flags, ...) > _open(path, flags, ##__VA_ARGS__) > > Modified the 'open' macro to avoid it. Nit: "Modify" (present tense should be used here). > > Fixes: 45d62067c237 ("eal: make OS shims internal") > Cc: stable@dpdk.org > > Signed-off-by: Tal Shnaiderman > --- > lib/eal/windows/include/rte_os_shim.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/eal/windows/include/rte_os_shim.h b/lib/eal/windows/include/rte_os_shim.h > index 33619745ab..eda8113662 100644 > --- a/lib/eal/windows/include/rte_os_shim.h > +++ b/lib/eal/windows/include/rte_os_shim.h > @@ -25,7 +25,7 @@ > #define strncasecmp(s1, s2, count) _strnicmp(s1, s2, count) > #endif > > -#define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__) > +#define open(...) _open(__VA_ARGS__) > #define read(fd, buf, n) _read(fd, buf, n) > #define write(fd, buf, n) _write(fd, buf, n) > #define close(fd) _close(fd) Note: Three-argument form of open() is seldom used in DPDK and only once in OS-independent code. However, rte_os_shim.h can be included in platform-specific file and it should not prevent using 3-argument open(). This patch is probably the most simple and robust thing we can do. Acked-by: Dmitry Kozlyuk