derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f975cdf51366448a64bb162a8641c41bdd435b04

commit f975cdf51366448a64bb162a8641c41bdd435b04
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Wed Jul 27 15:23:12 2016 -0500

    ecore-drm2: Silence compiler warning
    
    We probably can't actually use this variable uninitialized, but
    let's init it anyway to keep gcc happy.
---
 src/lib/ecore_drm2/ecore_drm2_outputs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c 
b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index f44bee8..6fe2180 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -993,15 +993,15 @@ ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, 
Eina_Bool enabled)
 
    if (output->enabled)
      {
-        Ecore_Drm2_Fb *fb;
+        Ecore_Drm2_Fb *fb = NULL;
 
         if (output->current) fb = output->current;
         else if (output->next) fb = output->next;
 
-        drmModeSetCrtc(output->fd, output->crtc_id, fb->id,
-                       output->x, output->y,
-                       &output->conn_id, 1,
-                       &output->current_mode->info);
+        if (fb) drmModeSetCrtc(output->fd, output->crtc_id, fb->id,
+                               output->x, output->y,
+                               &output->conn_id, 1,
+                               &output->current_mode->info);
 
         ecore_drm2_output_dpms_set(output, DRM_MODE_DPMS_ON);
      }

-- 


Reply via email to