From 6c7c1bdcfd6c306a900c92ea0c2eca75fc662052 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 28 Apr 2013 10:38:16 +0000 Subject: warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@4557 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/base64/base64.cpp | 11 ++++++----- protocols/Skype/src/skype_database.cpp | 7 ++++--- protocols/Skype/src/skype_dialogs.cpp | 2 +- protocols/Skype/src/skype_events.cpp | 2 +- protocols/Skype/src/skype_proto.cpp | 6 +++--- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/protocols/Skype/src/base64/base64.cpp b/protocols/Skype/src/base64/base64.cpp index f9e4aae760..4cd1ebf007 100644 --- a/protocols/Skype/src/base64/base64.cpp +++ b/protocols/Skype/src/base64/base64.cpp @@ -2,10 +2,10 @@ char Base64::CharBase64[] = { - 'A','B','C','D','E','F','G','H','I','J','K','L','M ','N','O','P', - 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c ','d','e','f', - 'g','h','i','j','k','l','m','n','o','p','q','r','s ','t','u','v', - 'w','x','y','z','0','1','2','3','4','5','6','7','8 ','9','+','/' + 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', + 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', + 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', + 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/' }; ULONG Base64::Encode(const char *inputString, char *outputBuffer, SIZE_T nMaxLength) @@ -15,7 +15,8 @@ ULONG Base64::Encode(const char *inputString, char *outputBuffer, SIZE_T nMaxLen for (unsigned int i = 0; i < ::strlen(inputString); i += 3) { - if (outpos + 4 >= (int)nMaxLength)break; + if (outpos + 4 >= (int)nMaxLength) + break; chr[0] = inputString[i]; chr[1] = inputString[i+1]; diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp index 3edf766ed0..c384611c7b 100644 --- a/protocols/Skype/src/skype_database.cpp +++ b/protocols/Skype/src/skype_database.cpp @@ -111,12 +111,13 @@ void CSkypeProto::RaiseMessageSendedEvent(HANDLE hContact, DWORD timestamp, cons if (this->IsMessageInDB(hContact, timestamp, guid, DBEF_SENT)) return; - int guidLen = ::strlen(guid); + int guidLen = (int)::strlen(guid); - int msgLen = ::strlen(message) + 1; + int msgLen = (int)::strlen(message) + 1; char *msg = (char *)::mir_alloc(msgLen + guidLen); - ::strcpy(msg, message); msg[msgLen - 1] = 0; + ::strcpy(msg, message); + msg[msgLen - 1] = 0; ::memcpy((char *)&msg[msgLen], guid, 32); DWORD flags = DBEF_UTF | DBEF_SENT; diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 647e84e155..a766fca74d 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -650,7 +650,7 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP if (chatID) { g_skype->GetConversationByIdentity(::mir_utf8encodeW(chatID), conversation); - for (uint i = 0; i < invitedContacts.getCount(); i++) + for (uint i = 0; i < (uint)invitedContacts.getCount(); i++) needToAdd.append((char *)mir_ptr(::mir_u2a(invitedContacts[i]))); conversation->AddConsumers(needToAdd); } diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index 3ba8f1a113..ac5bebdab2 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -88,7 +88,7 @@ int CSkypeProto::OnMessagePreCreate(WPARAM, LPARAM lParam) evt->dbei->pBlob = (PBYTE)::mir_realloc(evt->dbei->pBlob, evt->dbei->cbBlob + guid.size()); ::memcpy((char *)&evt->dbei->pBlob[evt->dbei->cbBlob], cguid, guid.size()); - evt->dbei->cbBlob += guid.size(); + evt->dbei->cbBlob += (DWORD)guid.size(); } return 1; diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 48688727dd..cb7fcdfb4d 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -277,16 +277,16 @@ int __cdecl CSkypeProto::RecvFile( HANDLE hContact, PROTORECVFILET* evt) return ::Proto_RecvFile(hContact, evt); } -int __cdecl CSkypeProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* pre) +int __cdecl CSkypeProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre) { ::db_unset(hContact, "CList", "Hidden"); this->UserIsTyping(hContact, PROTOTYPE_SELFTYPING_OFF); char *guid = (char *)pre->lParam; - int guidLen = ::strlen(guid); + int guidLen = (int)::strlen(guid); char *message = (char *)pre->szMessage; - int msgLen = ::strlen(message) + 1; + int msgLen = (int)::strlen(message) + 1; message = (char *)::mir_realloc(message, msgLen + guidLen); ::memcpy((char *)&message[msgLen], guid, guidLen); -- cgit v1.2.3