summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp2
-rw-r--r--plugins/Clist_nicer/src/coolscroll.cpp2
-rw-r--r--plugins/DbEditorPP/src/copymodule.cpp3
-rw-r--r--plugins/DbEditorPP/src/deletemodule.cpp5
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp3
-rw-r--r--plugins/DbEditorPP/src/renamemodule.cpp3
-rw-r--r--plugins/DbEditorPP/src/settinglist.cpp13
-rw-r--r--plugins/DbEditorPP/src/settingsdlg.cpp3
-rw-r--r--plugins/MenuItemEx/src/main.cpp6
-rw-r--r--plugins/PluginUpdater/src/Options.cpp3
-rw-r--r--plugins/Scriver/src/chat_window.cpp4
-rw-r--r--plugins/Scriver/src/msgdialog.cpp2
-rw-r--r--plugins/Scriver/src/msglog.cpp3
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp4
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp2
-rw-r--r--plugins/TipperYM/src/options.cpp10
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp2
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.cpp3
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp6
-rw-r--r--plugins/UserInfoEx/src/mir_icolib.cpp3
-rw-r--r--plugins/UserInfoEx/src/psp_anniversary.cpp36
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp6
-rw-r--r--plugins/Variables/src/help.cpp2
-rw-r--r--plugins/Weather/src/weather_contacts.cpp6
-rw-r--r--plugins/Weather/src/weather_ini.cpp3
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp3
-rw-r--r--protocols/FacebookRM/src/communication.cpp2
-rw-r--r--protocols/JabberG/src/jabber_bookmarks.cpp3
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp6
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp2
-rw-r--r--protocols/JabberG/src/jabber_form.cpp3
-rwxr-xr-xprotocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp8
-rw-r--r--protocols/MRA/src/MraPopUp.cpp3
-rw-r--r--protocols/MSN/src/msn_chat.cpp3
-rw-r--r--protocols/VKontakte/src/misc.cpp3
-rw-r--r--src/core/stdmsg/src/chat_window.cpp2
-rw-r--r--src/core/stdmsg/src/msglog.cpp3
-rw-r--r--src/core/stduserinfo/src/contactinfo.cpp10
-rw-r--r--src/mir_app/src/FontOptions.cpp3
-rw-r--r--src/mir_app/src/chat_opts.cpp3
-rw-r--r--src/mir_app/src/clui.cpp3
-rw-r--r--src/mir_app/src/findadd.cpp2
-rw-r--r--src/mir_app/src/ignore.cpp2
-rw-r--r--src/mir_app/src/netliblog.cpp3
-rw-r--r--src/mir_app/src/visibility.cpp3
47 files changed, 122 insertions, 87 deletions
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp
index 8425368ad1..25f8cd4f7a 100644
--- a/plugins/BasicHistory/src/HistoryWindow.cpp
+++ b/plugins/BasicHistory/src/HistoryWindow.cpp
@@ -594,8 +594,8 @@ INT_PTR CALLBACK HistoryWindow::DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wP
ResetCList(hwndDlg);
return FALSE;
}
+ __fallthrough;
- //fall through
case IDC_SHOWHIDE:
case IDC_FIND_TEXT:
case IDC_EDIT:
diff --git a/plugins/Clist_nicer/src/coolscroll.cpp b/plugins/Clist_nicer/src/coolscroll.cpp
index 9e2ea12830..0d6b91aa0e 100644
--- a/plugins/Clist_nicer/src/coolscroll.cpp
+++ b/plugins/Clist_nicer/src/coolscroll.cpp
@@ -1190,7 +1190,7 @@ static UINT DrawScrollButton(SCROLLBUT *sbut, HDC hdc, const RECT *pctrl, UINT f
if (sbut->uState != SBBS_NORMAL)
flags |= SBBS_PUSHED;
- //intentionally fall through here...
+ __fallthrough;
case SBBT_PUSHBUTTON:
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp
index 5ca149ee4e..052b6fd8d5 100644
--- a/plugins/DbEditorPP/src/copymodule.cpp
+++ b/plugins/DbEditorPP/src/copymodule.cpp
@@ -67,7 +67,8 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPar
SetCursor(LoadCursor(nullptr, IDC_ARROW));
}
refreshTree(1);
- // fall through
+ __fallthrough;
+
case IDCANCEL:
mir_free(mac);
DestroyWindow(hwnd);
diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp
index 4b07c0519b..2c08c762e4 100644
--- a/plugins/DbEditorPP/src/deletemodule.cpp
+++ b/plugins/DbEditorPP/src/deletemodule.cpp
@@ -90,7 +90,6 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM)
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
- {
char module[FLD_SIZE];
GetDlgItemTextA(hwnd, IDC_CONTACTS, module, _countof(module));
SetCursor(LoadCursor(nullptr, IDC_WAIT));
@@ -101,8 +100,8 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM)
deleteModule(NULL, module, 0);
SetCursor(LoadCursor(nullptr, IDC_ARROW));
refreshTree(1);
- }
- // fall through
+ __fallthrough;
+
case IDCANCEL:
if (working == 1) {
working = 0;
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index b7a404c980..425abae95a 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -390,7 +390,8 @@ void importSettings(MCONTACT hContact, char *utf8)
memmove(pstr + 1, pstr + 2, mir_strlen(pstr + 2) + 1);
}
}
- // fall through - write it to database
+ __fallthrough; // write it to database
+
case 'u':
case 'U':
db_set_utf(hContact, module, setting, (end + 2));
diff --git a/plugins/DbEditorPP/src/renamemodule.cpp b/plugins/DbEditorPP/src/renamemodule.cpp
index f242fe5f1f..89122b9b39 100644
--- a/plugins/DbEditorPP/src/renamemodule.cpp
+++ b/plugins/DbEditorPP/src/renamemodule.cpp
@@ -51,7 +51,8 @@ static INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARA
refreshTree(1);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
DestroyWindow(hwnd);
break;
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp
index 26f5a6f9f7..aaa8591c8b 100644
--- a/plugins/DbEditorPP/src/settinglist.cpp
+++ b/plugins/DbEditorPP/src/settinglist.cpp
@@ -62,11 +62,13 @@ int convertSetting(MCONTACT hContact, const char *module, const char *setting, i
case DBVT_WCHAR:
if (!value)
value = mir_wstrdup(dbv.pwszVal);
- // fall through
+ __fallthrough;
+
case DBVT_UTF8:
if (!value)
value = mir_utf8decodeW(dbv.pszVal);
- // fall through
+ __fallthrough;
+
case DBVT_ASCIIZ:
if (!value)
value = mir_a2u(dbv.pszVal);
@@ -519,7 +521,8 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd, UINT msg, WPARAM
case '0':
i = 1;
- // fall through
+ __fallthrough;
+
case '1':
case '2':
case '3':
@@ -579,8 +582,8 @@ static LRESULT CALLBACK SettingLabelEditSubClassProc(HWND hwnd, UINT msg, WPARAM
msg(TranslateT("Unable to store value in this data type!"));
break;
}
-
- } // fall through
+ }
+ __fallthrough;
case IDCANCEL:
DestroyWindow(hwnd);
diff --git a/plugins/DbEditorPP/src/settingsdlg.cpp b/plugins/DbEditorPP/src/settingsdlg.cpp
index 30ddd1b373..10201f6965 100644
--- a/plugins/DbEditorPP/src/settingsdlg.cpp
+++ b/plugins/DbEditorPP/src/settingsdlg.cpp
@@ -247,7 +247,8 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
db_unset(dbsetting->hContact, dbsetting->module, dbsetting->setting);
}
- } // fall through
+ }
+ __fallthrough;
case IDCANCEL:
struct DBsetting *dbsetting = (struct DBsetting*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 29a0aa89df..0a14892c56 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -389,11 +389,11 @@ static INT_PTR CALLBACK AuthReqWndProc(HWND hdlg, UINT msg, WPARAM wparam, LPARA
case WM_COMMAND:
switch (LOWORD(wparam)) {
case IDOK:
- {
- wchar_t tszReason[256] = { 0 };
+ wchar_t tszReason[256];
GetDlgItemText(hdlg, IDC_REASON, tszReason, _countof(tszReason));
ProtoChainSend(hcontact, PSS_AUTHREQUEST, 0, (LPARAM)tszReason);
- } // fall through
+ __fallthrough;
+
case IDCANCEL:
DestroyWindow(hdlg);
break;
diff --git a/plugins/PluginUpdater/src/Options.cpp b/plugins/PluginUpdater/src/Options.cpp
index 660b676d07..b8bbc5363c 100644
--- a/plugins/PluginUpdater/src/Options.cpp
+++ b/plugins/PluginUpdater/src/Options.cpp
@@ -161,7 +161,8 @@ static INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wPar
switch (LOWORD(wParam)) {
case IDC_UPDATEONSTARTUP:
EnableWindow(GetDlgItem(hwndDlg, IDC_ONLYONCEADAY), IsDlgButtonChecked(hwndDlg, IDC_UPDATEONSTARTUP));
- // fall through
+ __fallthrough;
+
case IDC_SILENTMODE:
case IDC_ONLYONCEADAY:
case IDC_BACKUP:
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp
index 5021e20fb0..7331033f84 100644
--- a/plugins/Scriver/src/chat_window.cpp
+++ b/plugins/Scriver/src/chat_window.cpp
@@ -915,7 +915,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
tcd.iFlags = TCDF_TEXT;
tcd.pszText = m_si->ptszName;
SendMessage(m_hwndParent, CM_UPDATETABCONTROL, (WPARAM)&tcd, (LPARAM)m_hwnd);
- // fall through
+ __fallthrough;
case DM_ACTIVATE:
if (m_si->wState & STATE_TALK) {
@@ -1012,7 +1012,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
if (LOWORD(wParam) != WA_ACTIVE)
break;
- // fall through
+ __fallthrough;
case WM_MOUSEACTIVATE:
if (uMsg != WM_ACTIVATE)
SetFocus(m_message.GetHwnd());
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 214c915608..faddf76067 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -1302,7 +1302,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
if (LOWORD(wParam) != WA_ACTIVE)
break;
- //fall through
+ __fallthrough;
case WM_MOUSEACTIVATE:
if (m_hDbUnreadEventFirst != 0) {
MEVENT hDbEvent = m_hDbUnreadEventFirst;
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index f388f9eae8..f594b637c1 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -695,7 +695,8 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
break;
dat->stage = STREAMSTAGE_TAIL;
- //fall through
+ __fallthrough;
+
case STREAMSTAGE_TAIL:
dat->buffer = CreateRTFTail();
dat->stage = STREAMSTAGE_STOP;
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp
index bf86bd245e..da2636eccf 100644
--- a/plugins/TabSRMM/src/chat_window.cpp
+++ b/plugins/TabSRMM/src/chat_window.cpp
@@ -1388,7 +1388,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
m_iLastEnterTime = 0;
return 0;
}
- // fall through
+ __fallthrough;
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
@@ -1936,7 +1936,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
m_pContainer->hwndSaved = nullptr;
break;
}
- // fall through
+ __fallthrough;
case WM_MOUSEACTIVATE:
UpdateWindowState(WM_ACTIVATE);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 41a908d09c..be9485c0e8 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -2472,7 +2472,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_ACTIVATE:
if (LOWORD(wParam) != WA_ACTIVE)
break;
- // fall through
+ __fallthrough;
case WM_MOUSEACTIVATE:
MsgWindowUpdateState(WM_ACTIVATE);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index c4c0ac3a40..e083b545fd 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1032,8 +1032,8 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
break;
}
dat->stage = STREAMSTAGE_TAIL;
+ __fallthrough;
- // fall through
case STREAMSTAGE_TAIL:
mir_free(dat->buffer);
dat->buffer = CreateRTFTail();
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 13cf5ad354..67de4e4143 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -1876,7 +1876,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam,
db_set_dw(0, MODULE, "FavContFlags", opt.iFavoriteContFlags);
}
- // fall through
+ __fallthrough;
case IDC_BTN_CANCEL:
DestroyWindow(hwndDlg);
@@ -1943,8 +1943,8 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case IDC_CHK_ENABLETRAYTIP:
state = IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_HANDLEBYTIPPER), state);
- // fall through
-
+ __fallthrough;
+
case IDC_CHK_HANDLEBYTIPPER:
state = IsDlgButtonChecked(hwndDlg, IDC_CHK_HANDLEBYTIPPER) & IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP);
@@ -1953,8 +1953,8 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
EnableWindow(GetDlgItem(hwndDlg, IDC_TREE_FIRST_ITEMS), state);
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_FAVCONTACTS), state);
EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_EXPAND), state);
- // fall through
-
+ __fallthrough;
+
case IDC_CHK_EXPAND:
state = IsDlgButtonChecked(hwndDlg, IDC_CHK_HANDLEBYTIPPER)
& IsDlgButtonChecked(hwndDlg, IDC_CHK_ENABLETRAYTIP)
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index e0faf32262..332585f4f1 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -138,7 +138,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
supressRepos = false;
break;
}
- // fall through
+ __fallthrough;
case TTB_REPOSBUTTONS:
if (g_ctrl->hWnd == hwnd) {
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp
index 342a760f11..125b7575d3 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.cpp
+++ b/plugins/UserInfoEx/src/ctrl_contact.cpp
@@ -306,7 +306,8 @@ INT_PTR CALLBACK DlgProc_Phone(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam
if ((int)IsDlgButtonChecked(hDlg, CHECK_SMS) != ((cbi->wFlags & CBEXIF_SMS) == CBEXIF_SMS))
cbi->wFlags ^= CBEXIF_SMS;
}
- //fall through
+ __fallthrough;
+
case IDCANCEL:
if (HIWORD(wParam) == BN_CLICKED)
EndDialog(hDlg, wParam);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
index 1b7b7b3a76..8be503a6db 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
@@ -230,13 +230,15 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str)
case ';':
// found a comment line
bComment |= (l == 0);
- // fall through
+ __fallthrough;
+
case '\t':
case ' ':
// ignore space and tab at the beginning of the line
if (l == 0)
break;
- // fall through
+ __fallthrough;
+
default:
if (!bComment) {
str = mir_strncat_c(str, c);
diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp
index a197d9d27c..3c3ed95943 100644
--- a/plugins/UserInfoEx/src/mir_icolib.cpp
+++ b/plugins/UserInfoEx/src/mir_icolib.cpp
@@ -193,7 +193,8 @@ void IcoLib_SetCtrlIcons(HWND hDlg, const ICONCTRL *pCtrl, BYTE numCtrls)
case STM_SETICON:
case STM_SETIMAGE:
ShowWindow(hCtrl, hIcon ? SW_SHOW : SW_HIDE);
- // fall through
+ __fallthrough;
+
case BM_SETIMAGE:
SendMessage(hCtrl, pCtrl[i].Message, IMAGE_ICON, (LPARAM)hIcon);
}
diff --git a/plugins/UserInfoEx/src/psp_anniversary.cpp b/plugins/UserInfoEx/src/psp_anniversary.cpp
index fb51299823..f4f3b89427 100644
--- a/plugins/UserInfoEx/src/psp_anniversary.cpp
+++ b/plugins/UserInfoEx/src/psp_anniversary.cpp
@@ -71,26 +71,28 @@ static INT_PTR CALLBACK DlgProc_AnniversaryEditor(HWND hDlg, UINT uMsg, WPARAM w
EnableWindow(GetDlgItem(hDlg, IDOK), GetWindowTextLength((HWND)lParam) > 0);
break;
- case IDOK: {
- // read new description
- HWND hEdit = GetDlgItem(hDlg, EDIT_CATEGORY);
- int len = Edit_GetTextLength(hEdit);
- LPTSTR pszText;
-
- if (len == 0
- || (pszText = (LPTSTR)_alloca((len + 1) * sizeof(wchar_t))) == nullptr
- || !Edit_GetText(hEdit, pszText, len + 1))
+ case IDOK:
{
- MsgErr(hDlg, LPGENW("Please enter a valid description first!"));
- break;
- }
+ // read new description
+ HWND hEdit = GetDlgItem(hDlg, EDIT_CATEGORY);
+ int len = Edit_GetTextLength(hEdit);
+ LPTSTR pszText;
+
+ if (len == 0
+ || (pszText = (LPTSTR)_alloca((len + 1) * sizeof(wchar_t))) == nullptr
+ || !Edit_GetText(hEdit, pszText, len + 1))
+ {
+ MsgErr(hDlg, LPGENW("Please enter a valid description first!"));
+ break;
+ }
- if (mir_wstrcmpi(pszText, pDlgEditAnniv->Description())) {
- pDlgEditAnniv->Description(pszText);
- pDlgEditAnniv->SetFlags(MAnnivDate::MADF_HASCUSTOM | MAnnivDate::MADF_CHANGED);
+ if (mir_wstrcmpi(pszText, pDlgEditAnniv->Description())) {
+ pDlgEditAnniv->Description(pszText);
+ pDlgEditAnniv->SetFlags(MAnnivDate::MADF_HASCUSTOM | MAnnivDate::MADF_CHANGED);
+ }
}
- }
- // fall through
+ __fallthrough;
+
case IDCANCEL:
return EndDialog(hDlg, LOWORD(wParam));
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index 057bc4c325..8c98ef6c57 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -554,7 +554,8 @@ static INT_PTR CALLBACK DlgProc_DetailsDlgOpts(HWND hDlg, UINT uMsg, WPARAM wPar
EnableControls(hDlg, idCtrl, _countof(idCtrl), bChecked);
}
- // fall through
+ __fallthrough;
+
case CHECK_OPT_GROUPS:
case CHECK_OPT_SORTTREE:
case CHECK_OPT_AEROADAPTION:
@@ -707,7 +708,8 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam
EnableControls(hDlg, idCtrl, _countof(idCtrl), bEnabled);
}
- // fall through
+ __fallthrough;
+
case EDIT_BIRTHMODULE:
if (bInitialized && HIWORD(wParam) == CBN_SELCHANGE)
NotifyParentOfChange(hDlg);
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp
index a605833839..59fd3b5170 100644
--- a/plugins/Variables/src/help.cpp
+++ b/plugins/Variables/src/help.cpp
@@ -952,7 +952,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l
}
dat->vhs->fi->hContact = (MCONTACT)SendMessage(hwndDlg, VARM_GETSUBJECT, 0, 0);
}
- // fall through
+ __fallthrough;
case IDC_CANCEL:
if (GetParent(hwndDlg) == nullptr)
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp
index 2348e9b69b..c770ebd5d0 100644
--- a/plugins/Weather/src/weather_contacts.cpp
+++ b/plugins/Weather/src/weather_contacts.cpp
@@ -260,7 +260,8 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
EnableWindow(GetDlgItem(hwndDlg, IDC_BROWSE), (BYTE)IsDlgButtonChecked(hwndDlg, IDC_External));
if (!(BYTE)IsDlgButtonChecked(hwndDlg, IDC_External))
return TRUE;
- // fall through
+ __fallthrough;
+
case IDC_BROWSE:
// browse for the external log file
GetDlgItemText(hwndDlg, IDC_LOG, str, _countof(str));
@@ -374,7 +375,8 @@ static INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
// re-enable the protocol and update the data for the station
db_set_s(hContact, WEATHERPROTONAME, "LastCondition", "None");
UpdateSingleStation(hContact, 0);
- // fall through
+ __fallthrough;
+
case IDCANCEL:
// remove the dialog from window list and close it
DestroyWindow(hwndDlg);
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp
index 994f80ce11..5e1caf5cef 100644
--- a/plugins/Weather/src/weather_ini.cpp
+++ b/plugins/Weather/src/weather_ini.cpp
@@ -199,7 +199,8 @@ static INT_PTR CALLBACK DlgProcSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case IDC_STEP4:
WeatherAdd(0, 0);
- // fall through
+ __fallthrough;
+
case IDCANCEL:
// close the info window
DestroyWindow(hwndDlg);
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index 60ca3431e3..b5ffce0881 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -845,7 +845,8 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT))
pcli->pfnRemoveEvent(hContact, hContact);
}
- // fall through
+ __fallthrough;
+
case WM_CONTEXTMENU:
PUDeletePopup(hWnd);
break;
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index de12e9075f..dbec3c4e32 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -556,7 +556,7 @@ bool facebook_client::login(const char *username, const char *password)
error = utils::text::slashu_to_utf8(utils::text::source_get_value(&resp.data, 2, "<strong>", "</strong"));
loginError(parent, error);
}
- // fall through
+ __fallthrough;
case HTTP_CODE_FORBIDDEN: // Forbidden
case HTTP_CODE_NOT_FOUND: // Not Found
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp
index bceb2b9689..1838665de4 100644
--- a/protocols/JabberG/src/jabber_bookmarks.cpp
+++ b/protocols/JabberG/src/jabber_bookmarks.cpp
@@ -137,7 +137,8 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM
param->ppro->SetBookmarkRequest(iq);
param->ppro->m_ThreadInfo->send(iq);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, 0);
break;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp
index c7a739b642..142fe7b535 100644
--- a/protocols/JabberG/src/jabber_chat.cpp
+++ b/protocols/JabberG/src/jabber_chat.cpp
@@ -1292,10 +1292,10 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g
szTitle.Format(TranslateT("Reason to destroy %s"), gch->ptszID);
if (ppro->EnterString(szBuffer, szTitle, ESF_MULTILINE, "gcReason_"))
ppro->m_ThreadInfo->send(
- XmlNodeIq(L"set", ppro->SerialNext(), gch->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER)
- << XCHILD(L"destroy") << XCHILD(L"reason", szBuffer));
+ XmlNodeIq(L"set", ppro->SerialNext(), gch->ptszID) << XQUERY(JABBER_FEAT_MUC_OWNER)
+ << XCHILD(L"destroy") << XCHILD(L"reason", szBuffer));
+ __fallthrough;
- // fall through
case IDM_LEAVE:
ppro->GcQuit(item, 200, nullptr);
break;
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index e6d123e7fd..d1fb73b739 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -962,7 +962,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
}
wParam = REFRESH_TIMER;
- // fall through
+ __fallthrough;
case WM_TIMER:
if (wParam == REFRESH_TIMER) {
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp
index 3e427452fb..bef07afdb5 100644
--- a/protocols/JabberG/src/jabber_form.cpp
+++ b/protocols/JabberG/src/jabber_form.cpp
@@ -826,7 +826,8 @@ static INT_PTR CALLBACK JabberFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
(jfi->ppro->*(jfi->pfnSubmit))(n, jfi->userdata);
xmlDestroyNode(n);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
case IDCLOSE:
DestroyWindow(hwndDlg);
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 73f017b910..374c60bee3 100755
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -474,7 +474,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
dat->item = nullptr;
break;
}
- // fall through
+ __fallthrough;
case WM_JABBER_REFRESH:
if (dat == nullptr) break;
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index 51676949ab..e39e3a690b 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -591,7 +591,8 @@ static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
mir_snprintf(idstr, "e-mailFlag%d", dat->id);
dat->ppro->setWord(idstr, nFlag);
}
- // fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
break;
@@ -639,7 +640,6 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
- {
char idstr[33];
if (dat->id < 0)
@@ -669,8 +669,8 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (IsDlgButtonChecked(hwndDlg, IDC_PCS)) nFlag |= JABBER_VCTEL_PCS;
mir_snprintf(idstr, "PhoneFlag%d", dat->id);
dat->ppro->setWord(idstr, nFlag);
- }
- // fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
break;
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp
index 4d27b75bb3..7338eb2fdb 100644
--- a/protocols/MRA/src/MraPopUp.cpp
+++ b/protocols/MRA/src/MraPopUp.cpp
@@ -82,7 +82,8 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
EnableWindow(GetDlgItem(hWndDlg, IDC_POPUP_TEXTCOLOR), (bEnabled && bUseWinColors == FALSE));
EnableWindow(GetDlgItem(hWndDlg, IDC_POPUP_TIMEOUT), bEnabled);
}
- // fall through
+ __fallthrough;
+
default:
if ((LOWORD(wParam) == IDC_POPUP_TIMEOUT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return FALSE;
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index 681a931702..140bb2fdf6 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -209,7 +209,8 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const wchar_t *mChatID
switch (gce.iType) {
case GC_EVENT_JOIN:
gce.ptszStatus = MSN_GCGetRole(MSN_GetThreadByChatId(mChatID), target->txt);
- // ..fall through.. //
+ __fallthrough;
+
case GC_EVENT_KICK:
case GC_EVENT_PART:
pszTarget = target->txt;
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 54b9f87f8f..79e9066c07 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -311,7 +311,8 @@ bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, const JSONNode &jnNode)
break;
case VKERR_FLOOD_CONTROL:
pReq->m_iRetry = 0;
- // fall through
+ __fallthrough;
+
case VKERR_UNKNOWN:
case VKERR_TOO_MANY_REQ_PER_SEC:
case VKERR_INTERNAL_SERVER_ERR:
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index 55ca576727..4767d84312 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -850,7 +850,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
return TRUE;
}
}
- // fall through
+ __fallthrough;
case WM_LBUTTONDOWN:
case WM_MBUTTONDOWN:
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index dac3fdb793..b06bdb9b64 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -371,7 +371,8 @@ static DWORD CALLBACK LogStreamInEvents(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG
}
}
dat->stage = STREAMSTAGE_TAIL;
- // fall through
+ __fallthrough;
+
case STREAMSTAGE_TAIL:
CreateRTFTail(dat->buf);
dat->stage = STREAMSTAGE_STOP;
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp
index 4a1c8ba273..41a5c6331e 100644
--- a/src/core/stduserinfo/src/contactinfo.cpp
+++ b/src/core/stduserinfo/src/contactinfo.cpp
@@ -42,9 +42,12 @@ static INT_PTR CALLBACK EditUserEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
switch (LOWORD(wParam)) {
case IDOK:
GetDlgItemTextA(hwndDlg, IDC_EMAIL, (char*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA), 256);
- //fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
+ __fallthrough;
+
case IDC_EMAIL:
if (HIWORD(wParam) == EN_CHANGE)
EnableWindow(GetDlgItem(hwndDlg, IDOK), GetWindowTextLength(GetDlgItem(hwndDlg, IDC_EMAIL)));
@@ -100,9 +103,12 @@ static INT_PTR CALLBACK EditUserPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar
}
if (IsDlgButtonChecked(hwndDlg, IDC_SMS)) mir_strcat(szText, " SMS");
}
- //fall through
+ __fallthrough;
+
case IDCANCEL:
EndDialog(hwndDlg, wParam);
+ __fallthrough;
+
case IDC_COUNTRY:
if (HIWORD(wParam) != CBN_SELCHANGE)
break;
diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp
index f3a417ae9f..6e3b97709a 100644
--- a/src/mir_app/src/FontOptions.cpp
+++ b/src/mir_app/src/FontOptions.cpp
@@ -913,8 +913,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
if (HIWORD(wParam) != LBN_DBLCLK)
return TRUE;
-
- //fall through
+ __fallthrough;
case IDC_CHOOSEFONT:
if (selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELCOUNT, 0, 0)) {
diff --git a/src/mir_app/src/chat_opts.cpp b/src/mir_app/src/chat_opts.cpp
index 705d74a125..2282f53374 100644
--- a/src/mir_app/src/chat_opts.cpp
+++ b/src/mir_app/src/chat_opts.cpp
@@ -166,7 +166,8 @@ void RegisterFonts(void)
FO.szDefFace = L"Webdings";
FO.defColour = RGB(170, 170, 170);
FO.defCharset = SYMBOL_CHARSET;
- // fall through
+ __fallthrough;
+
default:
wcsncpy_s(fontid.backgroundName, LPGENW("Group chat log background"), _TRUNCATE);
break;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index 75c66b3b25..5da831c9de 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -141,7 +141,8 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP
EndDialog(hWnd, IDC_HIDE);
break;
}
- //fall through
+ __fallthrough;
+
case IDCANCEL:
case IDNO:
EndDialog(hWnd, LOWORD(wParam));
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp
index 19caaf101a..fdadcd9b7c 100644
--- a/src/mir_app/src/findadd.cpp
+++ b/src/mir_app/src/findadd.cpp
@@ -439,7 +439,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP
GetClientRect(hwndList, &rc);
ListView_SetColumnWidth(hwndList, 0, rc.right);
}
- // fall through
+ __fallthrough;
case WM_MOVE:
if (dat && dat->hwndAdvSearch) {
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp
index bf7e23e659..86d60be867 100644
--- a/src/mir_app/src/ignore.cpp
+++ b/src/mir_app/src/ignore.cpp
@@ -253,7 +253,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
- //fall through
+ __fallthrough;
case CLN_CONTACTMOVED:
SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
break;
diff --git a/src/mir_app/src/netliblog.cpp b/src/mir_app/src/netliblog.cpp
index c0d17d7b3c..392f8dc4f3 100644
--- a/src/mir_app/src/netliblog.cpp
+++ b/src/mir_app/src/netliblog.cpp
@@ -247,7 +247,8 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa
}
}
InitLog();
- // fall through
+ __fallthrough;
+
case IDCANCEL:
DestroyWindow(hwndDlg);
}
diff --git a/src/mir_app/src/visibility.cpp b/src/mir_app/src/visibility.cpp
index e90fd88e05..77536c2c94 100644
--- a/src/mir_app/src/visibility.cpp
+++ b/src/mir_app/src/visibility.cpp
@@ -171,7 +171,8 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP
case CLN_NEWCONTACT:
case CLN_LISTREBUILT:
SetAllContactIcons(GetDlgItem(hwndDlg, IDC_LIST));
- //fall through
+ __fallthrough;
+
case CLN_CONTACTMOVED:
SetListGroupIcons(GetDlgItem(hwndDlg, IDC_LIST), (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETNEXTITEM, CLGN_ROOT, 0), hItemAll, nullptr);
break;