gvc-mixer-control: fix build warnings

- Fix warning about comparison between signed and unsigned integer
  expressions
- Change variable name 'output' to 'device' to fix warning:
  declaration of 'output' shadows a parameter
- Fix warning about missing default case in switch
This commit is contained in:
Alberts Muktupāvels 2015-09-15 15:45:53 +03:00
parent 84819a350d
commit 0a79019088

View File

@ -235,7 +235,7 @@ gvc_mixer_control_lookup_device_from_stream (GvcMixerControl *control,
for (d = devices; d != NULL; d = d->next) { for (d = devices; d != NULL; d = d->next) {
GvcMixerUIDevice *device = d->data; GvcMixerUIDevice *device = d->data;
gint stream_id = G_MAXINT; guint stream_id = G_MAXUINT;
g_object_get (G_OBJECT (device), g_object_get (G_OBJECT (device),
"stream-id", &stream_id, "stream-id", &stream_id,
@ -618,23 +618,23 @@ gvc_mixer_control_change_output (GvcMixerControl *control,
/* Finally if we are not on the correct stream, swap over. */ /* Finally if we are not on the correct stream, swap over. */
if (stream != default_stream) { if (stream != default_stream) {
GvcMixerUIDevice* output; GvcMixerUIDevice* device;
g_debug ("Attempting to swap over to stream %s ", g_debug ("Attempting to swap over to stream %s ",
gvc_mixer_stream_get_description (stream)); gvc_mixer_stream_get_description (stream));
if (gvc_mixer_control_set_default_sink (control, stream)) { if (gvc_mixer_control_set_default_sink (control, stream)) {
output = gvc_mixer_control_lookup_device_from_stream (control, stream); device = gvc_mixer_control_lookup_device_from_stream (control, stream);
g_signal_emit (G_OBJECT (control), g_signal_emit (G_OBJECT (control),
signals[ACTIVE_OUTPUT_UPDATE], signals[ACTIVE_OUTPUT_UPDATE],
0, 0,
gvc_mixer_ui_device_get_id (output)); gvc_mixer_ui_device_get_id (device));
} else { } else {
/* If the move failed for some reason reset the UI. */ /* If the move failed for some reason reset the UI. */
output = gvc_mixer_control_lookup_device_from_stream (control, default_stream); device = gvc_mixer_control_lookup_device_from_stream (control, default_stream);
g_signal_emit (G_OBJECT (control), g_signal_emit (G_OBJECT (control),
signals[ACTIVE_OUTPUT_UPDATE], signals[ACTIVE_OUTPUT_UPDATE],
0, 0,
gvc_mixer_ui_device_get_id (output)); gvc_mixer_ui_device_get_id (device));
} }
} }
} }
@ -1210,7 +1210,7 @@ match_stream_with_devices (GvcMixerControl *control,
gchar *origin; gchar *origin;
gchar *description; gchar *description;
GvcMixerCard *card; GvcMixerCard *card;
gint card_id; guint card_id;
device = d->data; device = d->data;
g_object_get (G_OBJECT (device), g_object_get (G_OBJECT (device),
@ -1300,7 +1300,7 @@ sync_devices (GvcMixerControl *control,
for (d = devices; d != NULL; d = d->next) { for (d = devices; d != NULL; d = d->next) {
GvcMixerCard *card; GvcMixerCard *card;
gint card_id; guint card_id;
device = d->data; device = d->data;
@ -1864,7 +1864,7 @@ static GList *
determine_profiles_for_port (pa_card_port_info *port, determine_profiles_for_port (pa_card_port_info *port,
GList* card_profiles) GList* card_profiles)
{ {
gint i; guint i;
GList *supported_profiles = NULL; GList *supported_profiles = NULL;
GList *p; GList *p;
for (i = 0; i < port->n_profiles; i++) { for (i = 0; i < port->n_profiles; i++) {
@ -2666,7 +2666,7 @@ remove_sink (GvcMixerControl *control,
devices = g_hash_table_get_values (control->priv->ui_outputs); devices = g_hash_table_get_values (control->priv->ui_outputs);
for (d = devices; d != NULL; d = d->next) { for (d = devices; d != NULL; d = d->next) {
gint stream_id = GVC_MIXER_UI_DEVICE_INVALID; guint stream_id = GVC_MIXER_UI_DEVICE_INVALID;
device = d->data; device = d->data;
g_object_get (G_OBJECT (device), g_object_get (G_OBJECT (device),
"stream-id", &stream_id, "stream-id", &stream_id,
@ -2714,7 +2714,7 @@ remove_source (GvcMixerControl *control,
devices = g_hash_table_get_values (control->priv->ui_inputs); devices = g_hash_table_get_values (control->priv->ui_inputs);
for (d = devices; d != NULL; d = d->next) { for (d = devices; d != NULL; d = d->next) {
gint stream_id = GVC_MIXER_UI_DEVICE_INVALID; guint stream_id = GVC_MIXER_UI_DEVICE_INVALID;
device = d->data; device = d->data;
g_object_get (G_OBJECT (device), g_object_get (G_OBJECT (device),
"stream-id", &stream_id, "stream-id", &stream_id,
@ -2831,6 +2831,8 @@ _pa_context_subscribe_cb (pa_context *context,
req_update_card (control, index); req_update_card (control, index);
} }
break; break;
default:
break;
} }
} }