From cb56b3c8913ff8ea50a92a6b74e0342d6377a235 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Sun, 14 Dec 2014 06:05:10 +0000 Subject: MRA: some warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@11394 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/MraFilesQueue.cpp | 6 +++--- protocols/MRA/src/MraProto.cpp | 2 +- protocols/MRA/src/Mra_proto.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/MRA/src') diff --git a/protocols/MRA/src/MraFilesQueue.cpp b/protocols/MRA/src/MraFilesQueue.cpp index 2eb7d8c64a..64ae8e554c 100644 --- a/protocols/MRA/src/MraFilesQueue.cpp +++ b/protocols/MRA/src/MraFilesQueue.cpp @@ -397,7 +397,7 @@ bool CMraProto::MraFilesQueueHandCheck(HANDLE hConnection, MRA_FILES_QUEUE_ITEM if (dat->bSending == FALSE) { // receiving dwBuffSize = mir_snprintf((LPSTR)btBuff, SIZEOF(btBuff), "%s %s", MRA_FT_HELLO, szEmailMy.c_str()) + 1; - if (dwBuffSize == Netlib_Send(hConnection, (LPSTR)btBuff, (int)dwBuffSize, 0)) { + if (dwBuffSize == (size_t)Netlib_Send(hConnection, (LPSTR)btBuff, (int)dwBuffSize, 0)) { // my email sended ProtoBroadcastAck(dat->hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, (HANDLE)dat->dwIDRequest, 0); dwBuffSize = Netlib_Recv(hConnection, (LPSTR)btBuff, sizeof(btBuff), 0); @@ -418,7 +418,7 @@ bool CMraProto::MraFilesQueueHandCheck(HANDLE hConnection, MRA_FILES_QUEUE_ITEM if (!_memicmp(btBuff, btBuff + dwBuffSize, dwBuffSize)) { // email verified dwBuffSize = (mir_snprintf((LPSTR)btBuff, SIZEOF(btBuff), "%s %s", MRA_FT_HELLO, szEmailMy.c_str()) + 1); - if (dwBuffSize == Netlib_Send(hConnection, (LPSTR)btBuff, dwBuffSize, 0)) + if (dwBuffSize == (size_t)Netlib_Send(hConnection, (LPSTR)btBuff, dwBuffSize, 0)) return true; } } @@ -800,7 +800,7 @@ void CMraProto::MraFilesQueueRecvThreadProc(LPVOID lpParameter) btBuff[dwBuffSizeUsed] = 0; dwBuffSizeUsed++; - if (dwBuffSizeUsed == Netlib_Send(dat->hConnection, (LPSTR)btBuff, dwBuffSizeUsed, 0)) {// file request sended + if (dwBuffSizeUsed == (size_t)Netlib_Send(dat->hConnection, (LPSTR)btBuff, dwBuffSizeUsed, 0)) {// file request sended hFile = CreateFileW(wszFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile != INVALID_HANDLE_VALUE) {// file opened/created, pre allocating disk space, for best perfomance bOK = FALSE; diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index 97324fdd53..9bc974b01a 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -456,7 +456,7 @@ int CMraProto::SetApparentMode(MCONTACT hContact, int mode) // Only 3 modes are supported if (hContact && (mode == 0 || mode == ID_STATUS_ONLINE || mode == ID_STATUS_OFFLINE)) { - DWORD dwOldMode = getWord(hContact, "ApparentMode", 0); + int dwOldMode = (int)getDword(hContact, "ApparentMode", 0); // Dont send redundant updates if (mode != dwOldMode) { diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 1d68867ab6..948d62cb46 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -1064,7 +1064,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) debugLogA("Groups: %s\n", szGroupMask); DWORD dwID = 0; for (DWORD i = 0; i < dwGroupsCount; i++) { //groups handle - DWORD dwControlParam = 0, dwGroupFlags; + DWORD dwControlParam = 0, dwGroupFlags = 0; for (int j = 0; j < szGroupMask.GetLength(); j++) { //enumerating parameters switch (szGroupMask[j]) { case 's'://LPS -- cgit v1.2.3