diff --git a/doc/CODING_STYLE b/doc/CODING_STYLE index be30359160..2c1577d8aa 100644 --- a/doc/CODING_STYLE +++ b/doc/CODING_STYLE @@ -105,19 +105,11 @@ applicable (i.e. wherever you just care about equality/inequality, not about the sorting order). -- Please do not allocate variables on the stack in the middle of code, - even if C99 allows it. Wrong: +- Preferably allocate stack variables on the top of the block: { - a = 5; - int b; - b = a; - } + int a, b; - Right: - - { - int b; a = 5; b = a; } diff --git a/meson.build b/meson.build index 18b4ace5b9..a4c2368df9 100644 --- a/meson.build +++ b/meson.build @@ -302,7 +302,6 @@ possible_cc_flags = [ '-Wold-style-definition', '-Wpointer-arith', '-Winit-self', - '-Wdeclaration-after-statement', '-Wfloat-equal', '-Wsuggest-attribute=noreturn', '-Werror=missing-prototypes', @@ -365,7 +364,7 @@ endif add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c') # "negative" arguments: gcc on purpose does not return an error for "-Wno-" -# arguments, just emits a warnings. So test for the "positive" version instead. +# arguments, just emits a warning. So test for the "positive" version instead. foreach arg : ['unused-parameter', 'missing-field-initializers', 'unused-result',