[PATCH 3/5] drm: Fix gcc warning about missing braces.

Pekka Paalanen ppaalanen at gmail.com
Wed Apr 6 08:17:28 UTC 2016


On Wed,  9 Mar 2016 16:49:30 -0800
Bryce Harrington <bryce at osg.samsung.com> wrote:

> 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 111c882..5ddedb9 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -2289,7 +2289,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) {

Hi,

this is good, but should be squashed in the previous patch.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160406/bab795e1/attachment.sig>


More information about the wayland-devel mailing list