From 9489d57d912508a4e011d32ee52616ed1a9b5755 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sun, 12 Feb 2017 15:58:06 +0900 Subject: [PATCH] e mixer pulse backened -f ix warning about use of uninit var display really isn't uninitialized due to the logic, but compielr is kind of right in theory... but less warnings is better so we fix the real problems more easily. fix. --- src/modules/mixer/lib/backends/pulseaudio/pulse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/mixer/lib/backends/pulseaudio/pulse.c b/src/modules/mixer/lib/backends/pulseaudio/pulse.c index 5d7ab71a8..99d697270 100644 --- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c +++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c @@ -789,7 +789,7 @@ _pulse_connect(void *data) "org.enlightenment.volumecontrol"); pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "audio-card"); #if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY) - char *display; + char *display = NULL; if (e_comp->comp_type != E_PIXMAP_TYPE_X) { @@ -814,8 +814,11 @@ _pulse_connect(void *data) #if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY) if (e_comp->comp_type != E_PIXMAP_TYPE_X) { - e_env_set("DISPLAY", display); - free(display); + if (display) + { + e_env_set("DISPLAY", display); + free(display); + } } #endif