summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-12 15:58:06 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-12 16:25:35 +0900
commit26b68f8c7e43621187d3303eb23238c81713e270 (patch)
tree421748bec89b4bbff300959d7368ce162dc5f582
parentf91086be7d1e33c13789df7c9acdb37638a4f8a1 (diff)
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.
-rw-r--r--src/modules/mixer/lib/backends/pulseaudio/pulse.c9
1 files 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 d578e8579..4773e3552 100644
--- a/src/modules/mixer/lib/backends/pulseaudio/pulse.c
+++ b/src/modules/mixer/lib/backends/pulseaudio/pulse.c
@@ -800,7 +800,7 @@ _pulse_connect(void *data)
800 "org.enlightenment.volumecontrol"); 800 "org.enlightenment.volumecontrol");
801 pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "audio-card"); 801 pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "audio-card");
802#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY) 802#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY)
803 char *display; 803 char *display = NULL;
804 804
805 if (e_comp->comp_type != E_PIXMAP_TYPE_X) 805 if (e_comp->comp_type != E_PIXMAP_TYPE_X)
806 { 806 {
@@ -825,8 +825,11 @@ _pulse_connect(void *data)
825#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY) 825#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY)
826 if (e_comp->comp_type != E_PIXMAP_TYPE_X) 826 if (e_comp->comp_type != E_PIXMAP_TYPE_X)
827 { 827 {
828 e_env_set("DISPLAY", display); 828 if (display)
829 free(display); 829 {
830 e_env_set("DISPLAY", display);
831 free(display);
832 }
830 } 833 }
831#endif 834#endif
832 835