[PATCH weston v5 04/11] drm: Fix gcc warning about missing braces.
Bryce Harrington
bryce at osg.samsung.com
Wed Apr 13 10:25:08 UTC 2016
Use double-brackets for config initializer for
create_output_for_connector to avoid gcc warning, since first
element is another struct. (See GCC bug 53119.)
Quells warning:
src/compositor-drm.c: In function ‘create_output_for_connector’:
src/compositor-drm.c:2292:9: warning: missing braces around initializer
[-Wmissing-braces]
struct weston_drm_backend_output_config config = { 0 };
^
src/compositor-drm.c:2292:9: warning: (near initialization for
‘config.base’) [-Wmissing-braces]
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
---
src/compositor-drm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 508b7e8..21af671 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -2292,7 +2292,7 @@ create_output_for_connector(struct drm_backend *b,
drmModeModeInfo crtc_mode;
int i;
enum weston_drm_backend_output_mode mode;
- struct weston_drm_backend_output_config config = { 0 };
+ struct weston_drm_backend_output_config config = {{ 0 }};
i = find_crtc_for_connector(b, resources, connector);
if (i < 0) {
--
1.9.1
More information about the wayland-devel
mailing list