xvd_mixer.c:51:sometimes-uninitialized ?

Bug #1351229 reported by dcb on 2014-08-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xfce4-volumed
Undecided
Unassigned

Bug Description

xvd_mixer.c:51:6: warning: variable 'device_name' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]

    if (g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (tmp_mixer)), "device-name"))
        g_object_get (tmp_mixer, "device-name", &device_name, NULL);

    /* Fall back to default name if neccessary */
    if (G_UNLIKELY (device_name == NULL))

Suggest init device_name at it's declaration.

    gchar *device_name = NULL;

Steve Dodier-Lazaro (sidi) wrote :

g_object_get will always set a value to device_name. So, unless the device-name property in the mixer object is incorrect, this could should work as expected in any case.

Changed in xfce4-volumed:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers