[i-g-t,1/2] meson: Drop -Wdeclaration-after-statement.

Submitted by Eric Anholt on Nov. 27, 2018, 8:46 p.m.

Details

Message ID 20181127204603.24042-1-eric@anholt.net
State New
Series "Series without cover letter"
Headers show

Commit Message

Eric Anholt Nov. 27, 2018, 8:46 p.m.
Being able to move declarations later is very useful in making clear,
concise code.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 meson.build | 1 -
 1 file changed, 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meson.build b/meson.build
index 469723dc4633..c5aab78716d5 100644
--- a/meson.build
+++ b/meson.build
@@ -11,7 +11,6 @@  cc = meson.get_compiler('c')
 
 cc_args = [
 	'-Wbad-function-cast',
-	'-Wdeclaration-after-statement',
 	'-Wformat=2',
 # igt_assert(0) in switch statements triggers a bunch of this.
 	'-Wimplicit-fallthrough=0',

Comments

Jani Nikula Nov. 28, 2018, 11:21 a.m.
On Tue, 27 Nov 2018, Eric Anholt <eric@anholt.net> wrote:
> Being able to move declarations later is very useful in making clear,
> concise code.

I guess you primarily need this in patch 2/2 for declaring the loop
variable in the for statement. I like that, just not the general case of
declarations after statements. Anyway, I'll let others fight the holy
wars on this. ;)

BR,
Jani.

>
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
>  meson.build | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 469723dc4633..c5aab78716d5 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -11,7 +11,6 @@ cc = meson.get_compiler('c')
>  
>  cc_args = [
>  	'-Wbad-function-cast',
> -	'-Wdeclaration-after-statement',
>  	'-Wformat=2',
>  # igt_assert(0) in switch statements triggers a bunch of this.
>  	'-Wimplicit-fallthrough=0',