summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-08 20:40:49 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-05-08 20:47:39 +0200
commit6a6f2b9e3b2749f16b513dfc98d5d5038b5628fb (patch)
treef0bc709157a49e0cff4ac436e60c0e098739b00c /protocols
parentc575dc94be9630240b7377a2e05011630bb8eb1e (diff)
merge from master
Diffstat (limited to 'protocols')
-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.cpp39
-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
10 files changed, 36 insertions, 30 deletions
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..95b737973b 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)
@@ -653,24 +653,25 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
GetDlgItemTextA(hwndDlg, IDC_PHONE, text, _countof(text));
mir_snprintf(idstr, "Phone%d", dat->id);
dat->ppro->setString(idstr, text);
+ {
+ WORD nFlag = 0;
+ if (IsDlgButtonChecked(hwndDlg, IDC_HOME)) nFlag |= JABBER_VCTEL_HOME;
+ if (IsDlgButtonChecked(hwndDlg, IDC_WORK)) nFlag |= JABBER_VCTEL_WORK;
+ if (IsDlgButtonChecked(hwndDlg, IDC_VOICE)) nFlag |= JABBER_VCTEL_VOICE;
+ if (IsDlgButtonChecked(hwndDlg, IDC_FAX)) nFlag |= JABBER_VCTEL_FAX;
+ if (IsDlgButtonChecked(hwndDlg, IDC_PAGER)) nFlag |= JABBER_VCTEL_PAGER;
+ if (IsDlgButtonChecked(hwndDlg, IDC_MSG)) nFlag |= JABBER_VCTEL_MSG;
+ if (IsDlgButtonChecked(hwndDlg, IDC_CELL)) nFlag |= JABBER_VCTEL_CELL;
+ if (IsDlgButtonChecked(hwndDlg, IDC_VIDEO)) nFlag |= JABBER_VCTEL_VIDEO;
+ if (IsDlgButtonChecked(hwndDlg, IDC_BBS)) nFlag |= JABBER_VCTEL_BBS;
+ if (IsDlgButtonChecked(hwndDlg, IDC_MODEM)) nFlag |= JABBER_VCTEL_MODEM;
+ if (IsDlgButtonChecked(hwndDlg, IDC_ISDN)) nFlag |= JABBER_VCTEL_ISDN;
+ if (IsDlgButtonChecked(hwndDlg, IDC_PCS)) nFlag |= JABBER_VCTEL_PCS;
+ mir_snprintf(idstr, "PhoneFlag%d", dat->id);
+ dat->ppro->setWord(idstr, nFlag);
+ }
+ __fallthrough;
- WORD nFlag = 0;
- if (IsDlgButtonChecked(hwndDlg, IDC_HOME)) nFlag |= JABBER_VCTEL_HOME;
- if (IsDlgButtonChecked(hwndDlg, IDC_WORK)) nFlag |= JABBER_VCTEL_WORK;
- if (IsDlgButtonChecked(hwndDlg, IDC_VOICE)) nFlag |= JABBER_VCTEL_VOICE;
- if (IsDlgButtonChecked(hwndDlg, IDC_FAX)) nFlag |= JABBER_VCTEL_FAX;
- if (IsDlgButtonChecked(hwndDlg, IDC_PAGER)) nFlag |= JABBER_VCTEL_PAGER;
- if (IsDlgButtonChecked(hwndDlg, IDC_MSG)) nFlag |= JABBER_VCTEL_MSG;
- if (IsDlgButtonChecked(hwndDlg, IDC_CELL)) nFlag |= JABBER_VCTEL_CELL;
- if (IsDlgButtonChecked(hwndDlg, IDC_VIDEO)) nFlag |= JABBER_VCTEL_VIDEO;
- if (IsDlgButtonChecked(hwndDlg, IDC_BBS)) nFlag |= JABBER_VCTEL_BBS;
- if (IsDlgButtonChecked(hwndDlg, IDC_MODEM)) nFlag |= JABBER_VCTEL_MODEM;
- if (IsDlgButtonChecked(hwndDlg, IDC_ISDN)) nFlag |= JABBER_VCTEL_ISDN;
- if (IsDlgButtonChecked(hwndDlg, IDC_PCS)) nFlag |= JABBER_VCTEL_PCS;
- mir_snprintf(idstr, "PhoneFlag%d", dat->id);
- dat->ppro->setWord(idstr, nFlag);
- }
- // fall through
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: