summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-07 15:08:02 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit3d6b013798a625b59c0cdf08dc7dde6b3bef3998 (patch)
tree2ca1f0f776ff7d2ffcc0d5fdac582ef6806b55c0 /meson.build
parent667cf93a38ec7a927acabe4cd6282fe2f274f70a (diff)
CODING_STYLE: allow c99-style mixed code and declarations
We already allowed variables to be declared in the middle of a function (whenever a new scope was opened), so this isn't such a big change. Sometimes we would open a scope just to work around this prohibition. But sometimes the code can be much clearer if the variable is declared somewhere in the middle of a scope, in particular if the declaration is combined with initialization or acquisition of some resources. So let's allow this, but keep things in the old style, unless there's a good reason to move the variable declaration to a different place.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build4
1 files changed, 2 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index c226dfaed..1356ae996 100644
--- a/meson.build
+++ b/meson.build
@@ -369,7 +369,6 @@ endif
# '-Wold-style-definition',
# '-Wpointer-arith',
# '-Winit-self',
-# '-Wdeclaration-after-statement',
# '-Wfloat-equal',
# '-Wsuggest-attribute=noreturn',
# '-Werror=missing-prototypes',
@@ -435,7 +434,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',
@@ -1928,6 +1927,7 @@ executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
executable('elogind-user-runtime-dir',
+executable('elogind-user-runtime-dir',
user_runtime_dir_sources,
include_directories : includes,
link_with : [libshared, liblogind_core],