patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Nick Connolly <nick.connolly@mayadata.io>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>,
	Dmitry Malloy <dmitrym@microsoft.com>,
	Pallavi Kadam <pallavi.kadam@intel.com>
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
	Nick Connolly <nick.connolly@mayadata.io>,
	stable@dpdk.org
Subject: [dpdk-stable] [PATCH] eal/windows: vfprintf build warning with clang
Date: Fri, 27 Nov 2020 12:07:11 +0000
Message-ID: <20201127120711.15703-1-nick.connolly@mayadata.io> (raw)

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


             reply	other threads:[~2020-11-27 12:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27 12:07 Nick Connolly [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201127120711.15703-1-nick.connolly@mayadata.io \
    --to=nick.connolly@mayadata.io \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dmitrym@microsoft.com \
    --cc=navasile@linux.microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git