[v1] build: add Wformat to fix gcc compile error

Message ID 20201112113537.1996073-1-conor.walsh@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v1] build: add Wformat to fix gcc compile error |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Conor Walsh Nov. 12, 2020, 11:35 a.m. UTC
  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

Thomas Monjalon Nov. 12, 2020, 6:47 p.m. UTC | #1
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?
  
Lingli Chen Nov. 13, 2020, 3:39 a.m. UTC | #2
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
  
Conor Walsh Nov. 13, 2020, 1:54 p.m. UTC | #3
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?
> 
>
  

Patch

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',