From 03ba85dcd2d47cf31d6181b40620e278f7f30427 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Mar 2017 18:08:38 +0300 Subject: more warnings fixed --- plugins/Scriver/src/chat.h | 3 --- plugins/Scriver/src/globals.cpp | 6 +++--- plugins/Scriver/src/sendqueue.cpp | 4 ++-- plugins/Scriver/src/sendqueue.h | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) (limited to 'plugins/Scriver') 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; -- cgit v1.2.3