alsa: don't pass non-constant strings as printf format strings

Fixes 'format not a string literal and no format arguments' compiler
warning when compiling with -DGST_DISABLE_PRINTF_EXTENSION.
This commit is contained in:
Tim-Philipp Müller 2010-04-08 01:26:09 +01:00
parent 0ebbb98bfa
commit 930f72c6b0
2 changed files with 4 additions and 2 deletions

View file

@ -476,7 +476,8 @@ no_channels:
g_strdup_printf (_
("Could not open device for playback in %d-channel mode."),
alsa->channels);
GST_ELEMENT_ERROR (alsa, RESOURCE, SETTINGS, (msg), (snd_strerror (err)));
GST_ELEMENT_ERROR (alsa, RESOURCE, SETTINGS, ("%s", msg),
("%s", snd_strerror (err)));
g_free (msg);
snd_pcm_hw_params_free (params);
return err;

View file

@ -413,7 +413,8 @@ no_channels:
g_strdup_printf (_
("Could not open device for recording in %d-channel mode"),
alsa->channels);
GST_ELEMENT_ERROR (alsa, RESOURCE, SETTINGS, (msg), (snd_strerror (err)));
GST_ELEMENT_ERROR (alsa, RESOURCE, SETTINGS, ("%s", msg),
("%s", snd_strerror (err)));
g_free (msg);
snd_pcm_hw_params_free (params);
return err;