test-audio-device-selection: fix -Wdiscarded-qualifiers warnings

This commit is contained in:
Alberts Muktupāvels 2019-12-25 19:23:18 +02:00
parent d8ba41f1d2
commit 15980858d3

View File

@ -8,7 +8,7 @@
typedef struct { typedef struct {
GvcHeadsetPortChoice choice; GvcHeadsetPortChoice choice;
gchar *name; const char *name;
} AudioSelectionChoice; } AudioSelectionChoice;
static AudioSelectionChoice audio_selection_choices[] = { static AudioSelectionChoice audio_selection_choices[] = {
@ -24,7 +24,7 @@ audio_selection_needed (GvcMixerControl *volume,
GvcHeadsetPortChoice choices, GvcHeadsetPortChoice choices,
gpointer user_data) gpointer user_data)
{ {
char *args[G_N_ELEMENTS (audio_selection_choices) + 1]; const char *args[G_N_ELEMENTS (audio_selection_choices) + 1];
guint i, n; guint i, n;
int response = -1; int response = -1;
@ -51,7 +51,7 @@ audio_selection_needed (GvcMixerControl *volume,
g_print ("What is your choice?\n"); g_print ("What is your choice?\n");
if (scanf ("%d", &res) == 1 && if (scanf ("%d", &res) == 1 &&
res > 0 && res > 0 &&
res < (int) g_strv_length (args)) { res < (int) g_strv_length ((char **) args)) {
response = res; response = res;
break; break;
} }