[pulseaudio-discuss] [PATCH] dbus: Fix uninitialized new_active warning

Peter Meerwald pmeerw at pmeerw.net
Mon Nov 17 04:36:35 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) {

David's commit 3978bbb1 fixes the same issue, dropped
 
> 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);
> 

-- 

Peter Meerwald
+43-664-2444418 (mobile)


More information about the pulseaudio-discuss mailing list