forked from enlightenment/enlightenment
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.
This commit is contained in:
parent
f91086be7d
commit
26b68f8c7e
|
@ -800,7 +800,7 @@ _pulse_connect(void *data)
|
||||||
"org.enlightenment.volumecontrol");
|
"org.enlightenment.volumecontrol");
|
||||||
pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "audio-card");
|
pa_proplist_sets(proplist, PA_PROP_APPLICATION_ICON_NAME, "audio-card");
|
||||||
#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY)
|
#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)
|
if (e_comp->comp_type != E_PIXMAP_TYPE_X)
|
||||||
{
|
{
|
||||||
|
@ -825,8 +825,11 @@ _pulse_connect(void *data)
|
||||||
#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY)
|
#if !defined(EMIXER_BUILD) && defined(HAVE_WAYLAND) && !defined(HAVE_WAYLAND_ONLY)
|
||||||
if (e_comp->comp_type != E_PIXMAP_TYPE_X)
|
if (e_comp->comp_type != E_PIXMAP_TYPE_X)
|
||||||
{
|
{
|
||||||
e_env_set("DISPLAY", display);
|
if (display)
|
||||||
free(display);
|
{
|
||||||
|
e_env_set("DISPLAY", display);
|
||||||
|
free(display);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue