Skip to content

Commit

Permalink
eal/windows: fix vfprintf warning with clang
Browse files Browse the repository at this point in the history
[ upstream commit 498ec3c ]

When building with clang (11.0,--buildtype=debug), eal_lcore.c
produces a -Wformat-nonliteral warning from the vfprintf call
in log_early.

Add __rte_format_printf annotation.

Fixes: b8a36b0 ("eal/windows: improve CPU and NUMA node detection")

Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Pallavi Kadam <pallavi.kadam@intel.com>
  • Loading branch information
nconnolly1 authored and bluca committed Feb 2, 2021
1 parent 10c9525 commit 6b2eccd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/librte_eal/windows/eal_lcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ static struct cpu_map cpu_map = { 0 };

/* eal_create_cpu_map() is called before logging is initialized */
static void
__rte_format_printf(1, 2)
log_early(const char *format, ...)
{
va_list va;
Expand Down

0 comments on commit 6b2eccd

Please sign in to comment.