summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Clist_modern/src/resource.h1
-rw-r--r--plugins/Dropbox/src/dropbox_commands.cpp3
-rw-r--r--plugins/Scriver/src/chat.h3
-rw-r--r--plugins/Scriver/src/globals.cpp6
-rw-r--r--plugins/Scriver/src/sendqueue.cpp4
-rw-r--r--plugins/Scriver/src/sendqueue.h2
-rw-r--r--protocols/Discord/src/connection.cpp2
-rw-r--r--protocols/Discord/src/gateway.cpp2
-rw-r--r--protocols/Discord/src/groupchat.cpp6
-rw-r--r--protocols/IRCG/src/tools.cpp2
-rw-r--r--protocols/MSN/src/msn_chat.cpp2
-rw-r--r--protocols/MSN/src/msn_commands.cpp2
-rw-r--r--protocols/Twitter/src/oauth.cpp4
-rw-r--r--protocols/Twitter/src/utility.cpp6
14 files changed, 21 insertions, 24 deletions
diff --git a/plugins/Clist_modern/src/resource.h b/plugins/Clist_modern/src/resource.h
index 7110650081..ba772b5bc4 100644
--- a/plugins/Clist_modern/src/resource.h
+++ b/plugins/Clist_modern/src/resource.h
@@ -408,7 +408,6 @@
#define IDC_GROUP_1 1880
#define IDC_GROUP_2 1881
#define IDC_GROUP_3 1883
-#define IDC_COLOR 1884
#define IDC_COPY 1885
#define IDC_ST_COLOUR 1886
#define IDC_ST_ALPHA 1887
diff --git a/plugins/Dropbox/src/dropbox_commands.cpp b/plugins/Dropbox/src/dropbox_commands.cpp
index 350fd3d8c7..c9eb2492ae 100644
--- a/plugins/Dropbox/src/dropbox_commands.cpp
+++ b/plugins/Dropbox/src/dropbox_commands.cpp
@@ -55,7 +55,8 @@ void CDropbox::CommandList(void *arg)
for (size_t i = 0; i < entries.size(); i++) {
JSONNode entry = entries[i];
CMStringA subName(entry.at("path_lower").as_string().c_str());
- message.AppendFormat("%s\n", (subName[0] == '/') ? subName.Mid(1) : subName);
+ message.Append((subName[0] == '/') ? subName.Mid(1) : subName);
+ message.AppendChar('\n');
}
}
diff --git a/plugins/Scriver/src/chat.h b/plugins/Scriver/src/chat.h
index ca620576f1..fb21c082b8 100644
--- a/plugins/Scriver/src/chat.h
+++ b/plugins/Scriver/src/chat.h
@@ -66,9 +66,6 @@ struct GlobalLogSettings : public GlobalLogSettingsBase
};
extern GlobalLogSettings g_Settings;
-// main.c
-void UpgradeCheck(void);
-
// log.c
void LoadMsgLogBitmaps(void);
void FreeMsgLogBitmaps(void);
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp
index d1bf90f4b6..b01c9cc288 100644
--- a/plugins/Scriver/src/globals.cpp
+++ b/plugins/Scriver/src/globals.cpp
@@ -113,9 +113,9 @@ static int ackevent(WPARAM, LPARAM lParam)
return 0;
MCONTACT hContact = pAck->hContact;
- MessageSendQueueItem *item = FindSendQueueItem(hContact, (HANDLE)pAck->hProcess);
+ MessageSendQueueItem *item = FindSendQueueItem(hContact, pAck->hProcess);
if (item == nullptr)
- item = FindSendQueueItem(hContact = db_mc_getMeta(pAck->hContact), (HANDLE)pAck->hProcess);
+ item = FindSendQueueItem(hContact = db_mc_getMeta(pAck->hContact), pAck->hProcess);
if (item == nullptr)
return 0;
@@ -151,7 +151,7 @@ static int ackevent(WPARAM, LPARAM lParam)
dbei.cbBlob = (int)mir_strlen(item->sendBuffer) + 1;
dbei.pBlob = (PBYTE)item->sendBuffer;
- MessageWindowEvent evt = { sizeof(evt), (INT_PTR)item->hSendId, hContact, &dbei };
+ MessageWindowEvent evt = { sizeof(evt), item->hSendId, hContact, &dbei };
NotifyEventHooks(hHookWinWrite, 0, (LPARAM)&evt);
item->sendBuffer = (char *)dbei.pBlob;
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp
index e9884ff369..576f7a9131 100644
--- a/plugins/Scriver/src/sendqueue.cpp
+++ b/plugins/Scriver/src/sendqueue.cpp
@@ -59,7 +59,7 @@ MessageSendQueueItem* FindSendQueueItem(MCONTACT hContact, HANDLE hSendId)
{
mir_cslock lock(queueMutex);
for (MessageSendQueueItem *item = global_sendQueue; item != nullptr; item = item->next)
- if (item->hContact == hContact && item->hSendId == hSendId)
+ if (item->hContact == hContact && HANDLE(item->hSendId) == hSendId)
return item;
return nullptr;
@@ -181,5 +181,5 @@ void SendSendQueueItem(MessageSendQueueItem* item)
}
lock.unlock();
- item->hSendId = (HANDLE)ProtoChainSend(item->hContact, PSS_MESSAGE, item->flags, (LPARAM)item->sendBuffer);
+ item->hSendId = ProtoChainSend(item->hContact, PSS_MESSAGE, item->flags, (LPARAM)item->sendBuffer);
}
diff --git a/plugins/Scriver/src/sendqueue.h b/plugins/Scriver/src/sendqueue.h
index 470e3d5553..1efb70dbe4 100644
--- a/plugins/Scriver/src/sendqueue.h
+++ b/plugins/Scriver/src/sendqueue.h
@@ -29,7 +29,7 @@ struct MessageSendQueueItem
HWND hwndSender;
MCONTACT hContact;
char *proto;
- HANDLE hSendId;
+ int hSendId;
int timeout;
char *sendBuffer;
int sendBufferSize;
diff --git a/protocols/Discord/src/connection.cpp b/protocols/Discord/src/connection.cpp
index ddb1a77e04..ae8da49d97 100644
--- a/protocols/Discord/src/connection.cpp
+++ b/protocols/Discord/src/connection.cpp
@@ -24,7 +24,7 @@ void CDiscordProto::ExecuteRequest(AsyncHttpRequest *pReq)
pReq->szUrl = pReq->m_szUrl.GetBuffer();
if (!pReq->m_szParam.IsEmpty()) {
if (pReq->requestType == REQUEST_GET) {
- str.Format("%s?%s", pReq->m_szUrl, pReq->m_szParam);
+ str.Format("%s?%s", pReq->m_szUrl.c_str(), pReq->m_szParam.c_str());
pReq->szUrl = str.GetBuffer();
}
else {
diff --git a/protocols/Discord/src/gateway.cpp b/protocols/Discord/src/gateway.cpp
index 51a4b7344f..9d3266917a 100644
--- a/protocols/Discord/src/gateway.cpp
+++ b/protocols/Discord/src/gateway.cpp
@@ -248,7 +248,7 @@ void CDiscordProto::GatewayThreadWorker()
if (hdr.bIsFinal) {
// process a packet here
CMStringA szJson(netbuf.data() + hdr.headerSize, (int)hdr.payloadSize);
- debugLogA("JSON received:\n%s", szJson);
+ debugLogA("JSON received:\n%s", szJson.c_str());
JSONNode root = JSONNode::parse(szJson);
if (root)
GatewayProcess(root);
diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp
index d5574eb2b7..e0f1603ac8 100644
--- a/protocols/Discord/src/groupchat.cpp
+++ b/protocols/Discord/src/groupchat.cpp
@@ -106,7 +106,7 @@ void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch)
switch (gch->dwData) {
case IDM_DESTROY:
if (IDYES == MessageBox(nullptr, TranslateT("Do you really want to destroy this channel? This action is non-revertable."), m_tszUserName, MB_YESNO | MB_ICONQUESTION)) {
- CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername);
+ CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str());
Push(new AsyncHttpRequest(this, REQUEST_DELETE, szUrl, nullptr));
}
break;
@@ -117,7 +117,7 @@ void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch)
es.szDataPrefix = "chat_rename";
if (EnterString(&es)) {
JSONNode root; root << WCHAR_PARAM("name", es.ptszResult);
- CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername);
+ CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str());
Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root));
mir_free(es.ptszResult);
}
@@ -129,7 +129,7 @@ void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch)
es.szDataPrefix = "chat_topic";
if (EnterString(&es)) {
JSONNode root; root << WCHAR_PARAM("topic", es.ptszResult);
- CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername);
+ CMStringA szUrl(FORMAT, "/channels/%S", pUser->wszUsername.c_str());
Push(new AsyncHttpRequest(this, REQUEST_PATCH, szUrl, nullptr, &root));
mir_free(es.ptszResult);
}
diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp
index ea2fab0673..3efe9a248e 100644
--- a/protocols/IRCG/src/tools.cpp
+++ b/protocols/IRCG/src/tools.cpp
@@ -619,7 +619,7 @@ void CIrcProto::DoUserhostWithReason(int type, CMStringW reason, bool bSendComma
}
va_list ap;
- va_start(ap, &userhostparams);
+ va_start(ap, userhostparams);
mir_vsnwprintf(temp, _countof(temp), (S + L" " + userhostparams).c_str(), ap);
va_end(ap);
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index 605577750c..f46ca005ca 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -258,7 +258,7 @@ void CMsnProto::MSN_GCRefreshThreadsInfo(void)
}
}
if (nThreads)
- msnNsThread->sendPacketPayload("GET", "MSGR\\THREADS", "<threads>%s</threads>", buf);
+ msnNsThread->sendPacketPayload("GET", "MSGR\\THREADS", "<threads>%s</threads>", buf.c_str());
}
void CMsnProto::MSN_GCAddMessage(wchar_t *mChatID, MCONTACT hContact, char *email, time_t ts, bool sentMsg, char *msgBody)
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index f4318216ce..bfbd1b0fe3 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -177,7 +177,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
szBody.AppendFormat("Ack-Id: %s\r\n", tHeader["Ack-Id"]);
if (msnRegistration) szBody.AppendFormat("Registration: %s\r\n", msnRegistration);
szBody.AppendFormat("\r\n");
- msnNsThread->sendPacket("ACK", "MSGR %d\r\n%s", mir_strlen(szBody), szBody);
+ msnNsThread->sendPacket("ACK", "MSGR %d\r\n%s", szBody.GetLength(), szBody.c_str());
}
msgBody = tHeader.readFromBuffer(msgBody);
if (!(email = NEWSTR_ALLOCA(tHeader["From"]))) return;
diff --git a/protocols/Twitter/src/oauth.cpp b/protocols/Twitter/src/oauth.cpp
index 6579a1e797..efca13a9c8 100644
--- a/protocols/Twitter/src/oauth.cpp
+++ b/protocols/Twitter/src/oauth.cpp
@@ -251,7 +251,7 @@ map<wstring, wstring> mir_twitter::CrackURL(wstring url)
//debugLogW("**CRACK::3 - port is %s", port1);
explicitPort = L"1";
}
- else ppro_->debugLogW(L"**CRACK - not a proper URL? doesn't have a colon. URL is %s", url);
+ else ppro_->debugLogW(L"**CRACK - not a proper URL? doesn't have a colon. URL is %s", url.c_str());
for (size_t i = 1; i < urlToks2.size(); ++i) {
if (i > 1) {
@@ -308,7 +308,7 @@ wstring mir_twitter::OAuthNormalizeUrl(const wstring& url)
if (Compare(brokenURL[L"scheme"], L"http", false) && !(Compare(brokenURL[L"port"], L"80", false)) ||
(Compare(brokenURL[L"scheme"], L"https", false) && !(Compare(brokenURL[L"port"], L"443", false))))
{
- mir_snwprintf(port, _countof(port), L":%s", brokenURL[L"port"]);
+ mir_snwprintf(port, _countof(port), L":%s", brokenURL[L"port"].c_str());
}
// InternetCrackUrl includes ? and # elements in the path,
diff --git a/protocols/Twitter/src/utility.cpp b/protocols/Twitter/src/utility.cpp
index 6ac208279d..cbd0f18093 100644
--- a/protocols/Twitter/src/utility.cpp
+++ b/protocols/Twitter/src/utility.cpp
@@ -57,7 +57,7 @@ http::response mir_twitter::slurp(const std::string &url, http::method meth, OAu
std::wstring auth;
if (meth == http::get) {
- if (url_WSTR.size() > 0) { ppro_->debugLogW(L"**SLURP::GET - we have a URL: %s", url_WSTR); }
+ if (url_WSTR.size() > 0) { ppro_->debugLogW(L"**SLURP::GET - we have a URL: %s", url_WSTR.c_str()); }
if (consumerKey_.size() > 0) { ppro_->debugLogA("**SLURP::GET - we have a consumerKey"); }
if (consumerSecret_.size() > 0) { ppro_->debugLogA("**SLURP::GET - we have a consumerSecret"); }
if (oauthAccessToken_.size() > 0) { ppro_->debugLogA("**SLURP::GET - we have a oauthAccessToken"); }
@@ -69,7 +69,7 @@ http::response mir_twitter::slurp(const std::string &url, http::method meth, OAu
}
else if (meth == http::post) {
// OAuthParameters postParams;
- if (url_WSTR.size() > 0) { ppro_->debugLogW(L"**SLURP::POST - we have a URL: %s", url_WSTR); }
+ if (url_WSTR.size() > 0) { ppro_->debugLogW(L"**SLURP::POST - we have a URL: %s", url_WSTR.c_str()); }
if (consumerKey_.size() > 0) { ppro_->debugLogA("**SLURP::POST - we have a consumerKey"); }
if (consumerSecret_.size() > 0) { ppro_->debugLogA("**SLURP::POST - we have a consumerSecret"); }
if (oauthAccessToken_.size() > 0) { ppro_->debugLogA("**SLURP::POST - we have a oauthAccessToken"); }
@@ -78,7 +78,7 @@ http::response mir_twitter::slurp(const std::string &url, http::method meth, OAu
pdata_WSTR = BuildQueryString(postParams);
- ppro_->debugLogW(L"**SLURP::POST - post data is: %s", pdata_WSTR);
+ ppro_->debugLogW(L"**SLURP::POST - post data is: %s", pdata_WSTR.c_str());
auth = OAuthWebRequestSubmit(url_WSTR, L"POST", &postParams, consumerKey_, consumerSecret_, oauthAccessToken_, oauthAccessTokenSecret_);
}