From 0e17dc79b38bc57fd9a7f9b54cd2cc672e1d69f1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 7 Jun 2016 15:11:27 +0900 Subject: [PATCH] wl_shm: Fix uninitialized warning warning: variable 'surf' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] --- src/modules/evas/engines/wayland_shm/evas_dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c index 5d39e41..2b26dd9 100644 --- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c @@ -629,7 +629,7 @@ _evas_dmabuf_surface_destroy(Surface *s) Eina_Bool _evas_dmabuf_surface_create(Surface *s, int w, int h, int num_buff) { - Dmabuf_Surface *surf; + Dmabuf_Surface *surf = NULL; int i = 0; if (dmabuf_totally_hosed) return EINA_FALSE; @@ -672,6 +672,6 @@ _evas_dmabuf_surface_create(Surface *s, int w, int h, int num_buff) return EINA_TRUE; err: - _fallback(surf, w, h); + if (surf) _fallback(surf, w, h); return EINA_FALSE; } -- 2.7.4