patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] eal/windows: vfprintf build warning with clang
@ 2020-11-27 12:07 Nick Connolly
  2020-11-28 21:11 ` Dmitry Kozlyuk
  2020-11-29 13:00 ` [dpdk-stable] [PATCH v2] " Nick Connolly
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Connolly @ 2020-11-27 12:07 UTC (permalink / raw)
  To: Dmitry Kozlyuk, Narcisa Ana Maria Vasile, Dmitry Malloy, Pallavi Kadam
  Cc: dev, David Marchand, Nick Connolly, stable

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

Disable the warning for log_early when building with clang.
MinGW does not seem to detect the warning.

Fixes: b8a36b086625 ("eal/windows: improve CPU and NUMA node detection")
Cc: stable@dpdk.org

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
---
 lib/librte_eal/windows/eal_lcore.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_eal/windows/eal_lcore.c b/lib/librte_eal/windows/eal_lcore.c
index d5ff721e0..d996b4f89 100644
--- a/lib/librte_eal/windows/eal_lcore.c
+++ b/lib/librte_eal/windows/eal_lcore.c
@@ -36,6 +36,11 @@ struct cpu_map {
 
 static struct cpu_map cpu_map = { 0 };
 
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
+#endif
+
 /* eal_create_cpu_map() is called before logging is initialized */
 static void
 log_early(const char *format, ...)
@@ -47,6 +52,10 @@ log_early(const char *format, ...)
 	va_end(va);
 }
 
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
 int
 eal_create_cpu_map(void)
 {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-07 20:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 12:07 [dpdk-stable] [PATCH] eal/windows: vfprintf build warning with clang Nick Connolly
2020-11-28 21:11 ` Dmitry Kozlyuk
2020-11-28 22:46   ` Nick Connolly
2020-11-29 13:00 ` [dpdk-stable] [PATCH v2] " Nick Connolly
2020-11-29 13:42   ` Dmitry Kozlyuk
2020-12-07 20:25     ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2020-12-05  0:41   ` [dpdk-stable] " Kadam, Pallavi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).