Skip to content

Commit

Permalink
Fix build on some compilers regardind switch statement
Browse files Browse the repository at this point in the history
Fix the famous `error: a label can only be part of a statement and a
declaration is not a statement`.
  • Loading branch information
jubalh committed Jun 20, 2024
1 parent a8ba8af commit 996a1fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/command/cmd_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 996a1fd

Please sign in to comment.