hdajackretask: Fix build with gcc7

The old compiler doesn't allow a variable declaration inside switch
block.

Fixes: d349d20c12 ("hdajackretask: add support for pipewire stop/start")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2024-02-02 17:19:47 +01:00
parent cb85b257b4
commit 54b5913cd5

View file

@ -213,9 +213,11 @@ cleanup:
static gboolean restore_soundserver(struct soundserver* state, GError** err)
{
gboolean ok = FALSE;
gchar* clientconf;
switch (state->type) {
case PULSEAUDIO:
gchar* clientconf = get_pulseaudio_client_conf();
clientconf = get_pulseaudio_client_conf();
if (state->was_killed && g_unlink(clientconf) != 0) {
g_set_error(err, quark(), 0, "%s", g_strerror(errno));
g_free(clientconf);