summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-07-27 15:23:12 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-07-27 15:23:12 -0500
commitf975cdf51366448a64bb162a8641c41bdd435b04 (patch)
treeb67bc9890c46de9832bc2d9d5a4edfdcd3a1e685
parent4431ff01ffc40fc55c0923bee03296f67ee5ef65 (diff)
downloadefl-f975cdf51366448a64bb162a8641c41bdd435b04.tar.gz
ecore-drm2: Silence compiler warning
We probably can't actually use this variable uninitialized, but let's init it anyway to keep gcc happy.
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c10
1 files 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 f44bee8d23..6fe2180b68 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);
}