summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-01-27 20:11:07 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-01-27 20:11:07 +0000
commitdd802db0d3cb38f4590d15aebaa301eb4608157c (patch)
treeab9006370594f3357cca2aeaca4418f53189a99f /src
parenteefe0a2e6705204b0fdbb0bc5b798d9f4e6b67b1 (diff)
Minor bugfixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/modules.cpp2
-rw-r--r--src/mir_core/src/langpack.cpp2
-rw-r--r--src/modules/xml/xmlParser.cpp11
3 files changed, 8 insertions, 7 deletions
diff --git a/src/core/modules.cpp b/src/core/modules.cpp
index e69a0b719f..21824566ed 100644
--- a/src/core/modules.cpp
+++ b/src/core/modules.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../modules/langpack/langpack.h"
#include "../modules/chat/chat.h"
-int CheckRestart(); // core: IDD_WAITRESTART
+INT_PTR CheckRestart(); // core: IDD_WAITRESTART
int LoadSystemModule(void); // core: m_system.h services
int LoadNewPluginsModuleInfos(void); // core: preloading plugins
diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp
index 3c78d112f3..aa6d9f9d86 100644
--- a/src/mir_core/src/langpack.cpp
+++ b/src/mir_core/src/langpack.cpp
@@ -362,7 +362,7 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start
MultiByteToWideChar(lpinfo.codepage, 0, szLanguage, -1, lpinfo.tszLanguage, SIZEOF(lpinfo.tszLanguage));
- if (!lpinfo.tszLanguage[0] && (lpinfo.Locale == 0) || !GetLocaleInfo(lpinfo.Locale, LOCALE_SENGLANGUAGE, lpinfo.tszLanguage, sizeof(lpinfo.tszLanguage))) {
+ if (!lpinfo.tszLanguage[0] && (lpinfo.Locale == 0) || !GetLocaleInfo(lpinfo.Locale, LOCALE_SENGLANGUAGE, lpinfo.tszLanguage, SIZEOF(lpinfo.tszLanguage))) {
TCHAR *p = _tcschr(lpinfo.tszFileName, '_');
_tcsncpy_s(lpinfo.tszLanguage, ((p != NULL) ? (p + 1) : lpinfo.tszFileName), _TRUNCATE);
p = _tcsrchr(lpinfo.tszLanguage, _T('.'));
diff --git a/src/modules/xml/xmlParser.cpp b/src/modules/xml/xmlParser.cpp
index 21cf0a0548..069cec6678 100644
--- a/src/modules/xml/xmlParser.cpp
+++ b/src/modules/xml/xmlParser.cpp
@@ -1305,7 +1305,8 @@ char XMLNode::maybeAddTxT(void *pa, XMLCSTR tokenPStr)
{
// if the previous insertion was a comment (<!-- -->) AND
// if the previous previous insertion was a text then, delete the comment and append the text
- int n = d->nChild+d->nText+d->nClear-1, *o = d->pOrder;
+ size_t n = d->nChild+d->nText+d->nClear-1;
+ int *o = d->pOrder;
if (((o[n]&3) == eNodeClear)&&((o[n-1]&3) == eNodeText))
{
int i = o[n]>>2;
@@ -1314,7 +1315,7 @@ char XMLNode::maybeAddTxT(void *pa, XMLCSTR tokenPStr)
deleteClear(i);
i = o[n-1]>>2;
n = xstrlen(d->pText[i]);
- int n2 = xstrlen(lpt)+1;
+ size_t n2 = xstrlen(lpt)+1;
d->pText[i] = (XMLSTR)realloc((void*)d->pText[i], (n+n2)*sizeof(XMLCHAR));
if (!d->pText[i]) return 1;
memcpy((void*)(d->pText[i]+n), lpt, n2*sizeof(XMLCHAR));
@@ -2706,8 +2707,8 @@ XMLCSTR XMLNode::getInnerText() const
if (d->pInnerText) return d->pInnerText;
int count = nElement();
- int i, length = 1;
- for (i=0; i < count; i++)
+ size_t length = 1;
+ for (int i=0; i < count; i++)
{
XMLNodeContents c = enumContents(i);
switch (c.etype)
@@ -2722,7 +2723,7 @@ XMLCSTR XMLNode::getInnerText() const
}
XMLCHAR *buf = (XMLCHAR *)malloc(sizeof(XMLCHAR) * length);
XMLCHAR *pos = buf;
- for (i=0; i < count; i++)
+ for (int i=0; i < count; i++)
{
XMLNodeContents c = enumContents(i);
switch (c.etype)