On Mon, Feb 24, 2025 at 5:25 PM Andre Muezerie <[email protected]> wrote: > > Compiling with MSVC results in warnings like below: > > app/test-pmd/cmdline.c(9023): warning C5101: use of preprocessor > directive in function-like macro argument list is undefined behavior > > Signed-off-by: Andre Muezerie <[email protected]> > Signed-off-by: Chengwen Feng <[email protected]> > --- > app/test-pmd/cmdline.c | 12 ++++++++---- > app/test-pmd/testpmd.h | 2 ++ > 2 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 2afcf916c0..d0b47eac8f 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -8980,6 +8980,14 @@ dump_socket_mem(FILE *f) > last_total = total; > } > > +#ifdef RTE_EXEC_ENV_WINDOWS > +int > +rte_trace_save(void) > +{ > + return TEST_SKIPPED; > +} > +#endif > +
- I don't like this fake declaration. It does not comply with this function documented API. And there are other stubs for the trace API in eal/windows, where this could be a better place. - TEST_SKIPPED 77 is some known error code when invoking unit test via meson, which does not make sense with testpmd. I sent a simpler fix, could you have a look? https://patchwork.dpdk.org/project/dpdk/patch/[email protected]/ -- David Marchand

