[PATCH v2 13/14] drivers/raw: use portable variadic macros
David Marchand
david.marchand at redhat.com
Mon Dec 23 09:45:08 CET 2024
On Wed, Dec 11, 2024 at 11:08 PM Andre Muezerie
<andremue at linux.microsoft.com> wrote:
>
> 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 <andremue at linux.microsoft.com>
> ---
> drivers/raw/dpaa2_cmdif/dpaa2_cmdif_logs.h | 24 +++++++++----------
> drivers/raw/ifpga/base/opae_debug.h | 4 ++--
> drivers/raw/ifpga/base/opae_osdep.h | 20 ++++++++--------
Touching osdep wrapper headers in base driver is ok, but not
opae_debug.h as it is part of a base driver code.
I'll drop the change on this file.
> .../raw/ifpga/base/osdep_rte/osdep_generic.h | 4 ++--
> drivers/raw/ifpga/ifpga_rawdev.h | 16 ++++++-------
> drivers/raw/skeleton/skeleton_rawdev.h | 16 ++++++-------
> drivers/raw/skeleton/skeleton_rawdev_test.c | 8 +++----
> 7 files changed, 46 insertions(+), 46 deletions(-)
--
David Marchand
More information about the dev
mailing list