DPDK patches and discussions
 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>,
Subject: [dpdk-dev] [PATCH v2] eal/windows: vfprintf build warning with clang
Date: Sun, 29 Nov 2020 13:00:47 +0000	[thread overview]
Message-ID: <20201129130047.798-1-nick.connolly@mayadata.io> (raw)
In-Reply-To: <20201127120711.15703-1-nick.connolly@mayadata.io>

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: b8a36b086625 ("eal/windows: improve CPU and NUMA node detection")
Cc: stable@dpdk.org

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
* Use __rte_format_printf instead of disabling the warning

 lib/librte_eal/windows/eal_lcore.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/windows/eal_lcore.c b/lib/librte_eal/windows/eal_lcore.c
index d5ff721e0..a85149be9 100644
--- a/lib/librte_eal/windows/eal_lcore.c
+++ b/lib/librte_eal/windows/eal_lcore.c
@@ -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;

  parent reply	other threads:[~2020-11-29 13:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27 12:07 [dpdk-dev] [PATCH] " Nick Connolly
2020-11-28 21:11 ` Dmitry Kozlyuk
2020-11-28 22:46   ` Nick Connolly
2020-11-29 13:00 ` Nick Connolly [this message]
2020-11-29 13:42   ` [dpdk-dev] [PATCH v2] " Dmitry Kozlyuk
2020-12-07 20:25     ` Thomas Monjalon
2020-12-05  0:41   ` 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:

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

  git send-email \
    --in-reply-to=20201129130047.798-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 \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).