[dpdk-stable] [dpdk-dev] [PATCH] eal/windows: fix token pasting build warning

Thomas Monjalon thomas at monjalon.net
Thu Sep 23 19:17:44 CEST 2021


15/09/2021 21:25, Dmitry Kozlyuk:
> 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 at dpdk.org
> > 
> > Signed-off-by: Tal Shnaiderman <talshn at nvidia.com>
> > ---
> > -#define open(path, flags, ...) _open(path, flags, ##__VA_ARGS__)
> > +#define open(...) _open(__VA_ARGS__)
> 
> 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 <dmitry.kozliuk at gmail.com>

Applied, thanks.





More information about the stable mailing list