]> git.alsa-project.org Git - alsa-tools.git/commitdiff
hdajackretask: Fix build with gcc7
authorTakashi Iwai <tiwai@suse.de>
Fri, 2 Feb 2024 16:19:47 +0000 (17:19 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 2 Feb 2024 16:24:26 +0000 (17:24 +0100)
The old compiler doesn't allow a variable declaration inside switch
block.

Fixes: d349d20c127b ("hdajackretask: add support for pipewire stop/start")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
hdajackretask/apply-changes.c

index 0d558f76f10655afd994d1039dc5939b0c2aaa86..381ccf2516d09f6ac51fadd1f8337ac042ccc8e1 100644 (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);