[PATCH weston v2 1/8] gl-renderer: Silence maybe-uninitialized warning

Giulio Camuffo giuliocamuffo at gmail.com
Mon Aug 8 10:24:07 UTC 2016


Hi,

Reviewed-by: Giulio Camuffo <giuliocamuffo at gmail.com>

2016-07-10 11:00 GMT+02:00 Quentin Glidic <sardemff7+wayland at sardemff7.net>:
> From: Quentin Glidic <sardemff7+git at sardemff7.net>
>
> libweston/gl-renderer.c: In function 'compress_bands':
> libweston/gl-renderer.c:481:6: warning: 'merged' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
>    if (!merged) {
>          ^
>
> Warning produced by GCC 5.3 and 6.1, with -Og.
>
> Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
> Reviewed-by: Yong Bakos <ybakos at humanoriented.com>
> ---
>  libweston/gl-renderer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
> index 28c0b50..73b6ccc 100644
> --- a/libweston/gl-renderer.c
> +++ b/libweston/gl-renderer.c
> @@ -455,7 +455,7 @@ static int
>  compress_bands(pixman_box32_t *inrects, int nrects,
>                    pixman_box32_t **outrects)
>  {
> -       bool merged;
> +       bool merged = false;
>         pixman_box32_t *out, merge_rect;
>         int i, j, nout;
>
> --
> 2.9.0
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list