summaryrefslogtreecommitdiff
path: root/src/modules/chat
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 22:12:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 22:12:34 +0000
commit6be364a555dce699d093f9d49cd14a9b0c174893 (patch)
treeac10770856206fb50d2e83acde528413f5f22009 /src/modules/chat
parentd9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (diff)
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/chat')
-rw-r--r--src/modules/chat/log.cpp2
-rw-r--r--src/modules/chat/manager.cpp8
-rw-r--r--src/modules/chat/tools.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/chat/log.cpp b/src/modules/chat/log.cpp
index e628a7c447..11e990b27f 100644
--- a/src/modules/chat/log.cpp
+++ b/src/modules/chat/log.cpp
@@ -198,7 +198,7 @@ static int Log_AppendRTF(LOGSTREAMDATA* streamData, BOOL simpleMode, char **buff
}
if (szTemp[0]) {
- int iLen = mir_strlen(szTemp);
+ size_t iLen = mir_strlen(szTemp);
memcpy(d, szTemp, iLen);
d += iLen;
}
diff --git a/src/modules/chat/manager.cpp b/src/modules/chat/manager.cpp
index 85899ca1b8..628b5307e3 100644
--- a/src/modules/chat/manager.cpp
+++ b/src/modules/chat/manager.cpp
@@ -750,7 +750,7 @@ static char* SM_GetUsers(SESSION_INFO *si)
SESSION_INFO *pTemp = ci.wndList;
USERINFO *utemp = NULL;
char* p = NULL;
- int alloced = 0;
+ size_t alloced = 0;
if (si == NULL)
return NULL;
@@ -766,11 +766,11 @@ static char* SM_GetUsers(SESSION_INFO *si)
}
do {
- int pLen = mir_strlen(p), nameLen = mir_tstrlen(utemp->pszUID);
+ size_t pLen = mir_strlen(p), nameLen = mir_tstrlen(utemp->pszUID);
if (pLen + nameLen + 2 > alloced)
p = (char*)mir_realloc(p, alloced += 4096);
- WideCharToMultiByte(CP_ACP, 0, utemp->pszUID, -1, p + pLen, nameLen + 1, 0, 0);
+ WideCharToMultiByte(CP_ACP, 0, utemp->pszUID, -1, p + pLen, (int)nameLen + 1, 0, 0);
mir_strcpy(p + pLen + nameLen, " ");
utemp = utemp->next;
}
@@ -1184,7 +1184,7 @@ static BOOL UM_SetStatusEx(USERINFO* pUserList, const TCHAR* pszText, int flags)
if (s) {
pTemp->iStatusEx = 0;
if (s == pszText || s[-1] == cDelimiter) {
- int len = mir_tstrlen(pTemp->pszUID);
+ size_t len = mir_tstrlen(pTemp->pszUID);
if (s[len] == cDelimiter || s[len] == '\0')
pTemp->iStatusEx = (!bOnlyMe || bSetStatus) ? 1 : 0;
}
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp
index 160c3157b4..aabd4535fb 100644
--- a/src/modules/chat/tools.cpp
+++ b/src/modules/chat/tools.cpp
@@ -42,11 +42,11 @@ TCHAR* RemoveFormatting(const TCHAR *pszWord)
return NULL;
TCHAR *d = szTemp;
- int cbLen = mir_tstrlen(pszWord);
+ size_t cbLen = mir_tstrlen(pszWord);
if (cbLen > SIZEOF(szTemp))
cbLen = SIZEOF(szTemp)-1;
- for (int i = 0; i < cbLen; ) {
+ for (size_t i = 0; i < cbLen;) {
if (pszWord[i] == '%') {
switch (pszWord[i+1]) {
case '%':