[v1] build: add Wformat to fix gcc compile error
Checks
Commit Message
On some systems Wformat-nonliteral and Wformat-security could not be
checked without Wformat also being specified. This patch adds Wformat
to config/meson.build
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
---
config/meson.build | 1 +
1 file changed, 1 insertion(+)
Comments
12/11/2020 12:35, Conor Walsh:
> On some systems Wformat-nonliteral and Wformat-security could not be
> checked without Wformat also being specified. This patch adds Wformat
> to config/meson.build
>
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Please could you provide (in a v2) more informations about the error
and why the fix is needed?
Tested-by: Chen, LingliX <linglix.chen@intel.com>
Regards,
Chen, LingliX
> -----Original Message-----
> From: Walsh, Conor
> Sent: Thursday, November 12, 2020 7:36 PM
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; Chen, LingliX <linglix.chen@intel.com>; Walsh, Conor
> <conor.walsh@intel.com>
> Subject: [PATCH v1] build: add Wformat to fix gcc compile error
>
> On some systems Wformat-nonliteral and Wformat-security could not be
> checked without Wformat also being specified. This patch adds Wformat to
> config/meson.build
>
> Signed-off-by: Conor Walsh <conor.walsh@intel.com>
> ---
> config/meson.build | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/config/meson.build b/config/meson.build index
> 258b01d068..15625c346a 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -192,6 +192,7 @@ warning_flags = [
> # additional warnings in alphabetical order
> '-Wcast-qual',
> '-Wdeprecated',
> + '-Wformat',
> '-Wformat-nonliteral',
> '-Wformat-security',
> '-Wmissing-declarations',
> --
> 2.25.1
Thanks for your reply Thomas, that's no problem.
I will expand the explanation for this patch when I push a v2,
v2 will hopefully also address the issues it caused with the icc build.
/Conor
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Thursday 12 November 2020 18:47
> To: Walsh, Conor <conor.walsh@intel.com>
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; dev@dpdk.org; Chen,
> LingliX <linglix.chen@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v1] build: add Wformat to fix gcc compile
> error
>
> 12/11/2020 12:35, Conor Walsh:
> > On some systems Wformat-nonliteral and Wformat-security could not be
> > checked without Wformat also being specified. This patch adds Wformat
> > to config/meson.build
> >
> > Signed-off-by: Conor Walsh <conor.walsh@intel.com>
>
> Please could you provide (in a v2) more informations about the error
> and why the fix is needed?
>
>
@@ -192,6 +192,7 @@ warning_flags = [
# additional warnings in alphabetical order
'-Wcast-qual',
'-Wdeprecated',
+ '-Wformat',
'-Wformat-nonliteral',
'-Wformat-security',
'-Wmissing-declarations',