[pulseaudio-discuss] [PATCH] dbus: Fix uninitialized new_active warning
Peter Meerwald
pmeerw at pmeerw.net
Sat Nov 15 05:21:03 PST 2014
modules/dbus/iface-device.c: In function 'handle_set_active_port':
modules/dbus/iface-device.c:765:34: warning: 'new_active' may be used uninitialized in this function [-Wmaybe-uninitialized]
if ((r = pa_sink_set_port(d->sink, pa_dbusiface_device_port_get_name(new_active), true)) < 0) {
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
src/modules/dbus/iface-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/dbus/iface-device.c b/src/modules/dbus/iface-device.c
index d469483..4469b78 100644
--- a/src/modules/dbus/iface-device.c
+++ b/src/modules/dbus/iface-device.c
@@ -727,7 +727,7 @@ static void handle_set_active_port(DBusConnection *conn, DBusMessage *msg, DBusM
const char *new_active_path;
pa_dbusiface_device_port *port;
void *state;
- pa_dbusiface_device_port *new_active;
+ pa_dbusiface_device_port *new_active = NULL;
int r;
pa_assert(conn);
--
1.9.1
More information about the pulseaudio-discuss
mailing list