[libcamera-devel] [PATCH 01/17] meson: Allow partially initializing objects
Niklas Söderlund
niklas.soderlund at ragnatech.se
Mon May 27 02:15:27 CEST 2019
There are valid use-cases where one might wish to partially initialize a
structure when creating it without needing to initialize all members.
This is especially common when working with V4L2.
struct foo {
int bar;
int baz;
};
struct foo f = {
.bar = 1;
};
Without -Wno-missing-field-initializers fails to compile with the error,
error: missing initializer for member ‘foo::baz’ [-Werror=missing-field-initializers]
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index 4d3e99d3e58f71d5..90ad58328f9a2bd5 100644
--- a/meson.build
+++ b/meson.build
@@ -22,6 +22,7 @@ endif
common_arguments = [
'-Wno-unused-parameter',
+ '-Wno-missing-field-initializers',
'-include', 'config.h',
]
--
2.21.0
More information about the libcamera-devel
mailing list