[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dpdk-dev
Subject:    Re: [dpdk-dev] [PATCH] eal/windows: vfprintf build warning with clang
From:       Nick Connolly <nick.connolly () mayadata ! io>
Date:       2020-11-28 22:46:12
Message-ID: d3865168-9e1a-11ef-6646-09a611ed9d18 () mayadata ! io
[Download RAW message or body]

Looks good to me!

On 28/11/2020 21:11, Dmitry Kozlyuk wrote:
> On Fri, 27 Nov 2020 12:07:11 +0000, Nick Connolly wrote:
>> [...]
>> +#ifdef __clang__
>> +#pragma clang diagnostic push
>> +#pragma clang diagnostic ignored "-Wformat-nonliteral"
>> +#endif
>> [...]
> How about a more safe approach?
>
> diff --git a/lib/librte_eal/windows/eal_lcore.c b/lib/librte_eal/windows/eal_lcore.c
> index d5ff721e0..ebcd3474e 100644
> --- a/lib/librte_eal/windows/eal_lcore.c
> +++ b/lib/librte_eal/windows/eal_lcore.c
> @@ -37,6 +37,7 @@ struct cpu_map {
>   static struct cpu_map cpu_map = { 0 };
>   
>   /* eal_create_cpu_map() is called before logging is initialized */
> +__rte_format_printf(1, 2)
>   static void
>   log_early(const char *format, ...)
>   {

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic