From 996a1fdf35d67b19a60467b391036391da4e3225 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 20 Jun 2024 18:04:12 +0200 Subject: [PATCH] Fix build on some compilers regardind switch statement Fix the famous `error: a label can only be part of a statement and a declaration is not a statement`. --- src/command/cmd_funcs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 035209bfc..b0c7092ef 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -9398,13 +9398,17 @@ _prepare_filename(ProfWin* window, gchar* url, gchar* path) // lets skip private windows and put those files in general download folder switch (window->type) { case WIN_CHAT: + { ProfChatWin* chatwin = (ProfChatWin*)window; jid = chatwin->barejid; break; + } case WIN_MUC: + { ProfMucWin* mucwin = (ProfMucWin*)window; jid = mucwin->roomjid; break; + } default: break; }