diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-15 20:00:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-15 20:00:45 +0000 |
commit | f440b596fc8670be8ea3fb1ec31322a3e4e4b9c7 (patch) | |
tree | e23e013e2e54c1e99ed6597c7b07ab4c8e8e9921 /plugins/Variables | |
parent | 623722f7cc4c20d2b7d8df03035801acacda6018 (diff) |
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@5708 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables')
-rw-r--r-- | plugins/Variables/src/parse_alias.cpp | 15 | ||||
-rw-r--r-- | plugins/Variables/src/parse_metacontacts.cpp | 6 | ||||
-rw-r--r-- | plugins/Variables/src/parse_miranda.cpp | 2 | ||||
-rw-r--r-- | plugins/Variables/src/parse_system.cpp | 2 |
4 files changed, 12 insertions, 13 deletions
diff --git a/plugins/Variables/src/parse_alias.cpp b/plugins/Variables/src/parse_alias.cpp index 3cbae2373e..87a95567ff 100644 --- a/plugins/Variables/src/parse_alias.cpp +++ b/plugins/Variables/src/parse_alias.cpp @@ -159,17 +159,17 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) { int res;
int argc, i;
- TCHAR *cur, *alias, **argv, *szArgs;
+ TCHAR **argv;
char *szHelp, *szArgsA;
if (ai->argc != 3)
return NULL;
- cur = ai->targv[1];
+ TCHAR *cur = ai->targv[1];
while (isValidTokenChar(*cur))
cur++;
- alias = (TCHAR*)mir_calloc(((cur-ai->targv[1])+1)*sizeof(TCHAR));
+ TCHAR *alias = (TCHAR*)mir_calloc(((cur-ai->targv[1])+1)*sizeof(TCHAR));
if (alias == NULL)
return NULL;
@@ -177,8 +177,8 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) { getArguments(cur, &argv, &argc);
deRegisterToken(alias);
addToAliasRegister(alias, argc, argv, ai->targv[2]);
- szArgs = NULL;
- for (i=0;i<argc;i++) {
+ TCHAR *szArgs = NULL;
+ for (i=0; i < argc; i++) {
if (i == 0)
szArgs = (TCHAR*)mir_calloc(( _tcslen(argv[i])+2)*sizeof(TCHAR));
else
@@ -192,7 +192,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) { szArgsA = mir_t2a(szArgs);
- int size = 32 + strlen(szArgsA);
+ size_t size = 32 + strlen(szArgsA);
szHelp = (char *)mir_alloc(size);
memset(szHelp, '\0', 32 + strlen(szArgsA));
mir_snprintf(szHelp, size, LPGEN("Alias")"\t(%s)\t"LPGEN("user defined"), szArgsA);
@@ -207,8 +207,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) { }
mir_free(szArgs);
mir_free(szHelp);
-
- return res==0?mir_tstrdup(_T("")):NULL;
+ return (res == 0) ? mir_tstrdup(_T("")) : NULL;
}
int registerAliasTokens()
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp index 40fe04c36b..e20c2833cf 100644 --- a/plugins/Variables/src/parse_metacontacts.cpp +++ b/plugins/Variables/src/parse_metacontacts.cpp @@ -59,7 +59,7 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai) return NULL;
}
- int size = strlen(szProto) + _tcslen(szUniqueID) + 4;
+ size_t size = strlen(szProto) + _tcslen(szUniqueID) + 4;
TCHAR *res = (TCHAR *)mir_alloc(size * sizeof(TCHAR));
if (res == NULL) {
mir_free(szUniqueID);
@@ -115,7 +115,7 @@ static TCHAR *parseGetDefault(ARGUMENTSINFO *ai) return NULL;
}
- int size = strlen(szProto) + _tcslen(szUniqueID) + 4;
+ size_t size = strlen(szProto) + _tcslen(szUniqueID) + 4;
TCHAR *res = (TCHAR *)mir_alloc(size * sizeof(TCHAR));
if (res == NULL) {
mir_free(szUniqueID);
@@ -171,7 +171,7 @@ static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai) return NULL;
}
- int size = strlen(szProto) + _tcslen(szUniqueID) + 4;
+ size_t size = strlen(szProto) + _tcslen(szUniqueID) + 4;
TCHAR *res = (TCHAR *)mir_alloc(size * sizeof(TCHAR));
if (res == NULL) {
mir_free(szUniqueID);
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index c3c4eb28b0..88fc767e6c 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -486,7 +486,7 @@ static TCHAR *parseSpecialContact(ARGUMENTSINFO *ai) return NULL;
}
- int size = strlen(szProto) + _tcslen(szUniqueID) + 4;
+ size_t size = strlen(szProto) + _tcslen(szUniqueID) + 4;
TCHAR *res = (TCHAR*)mir_alloc(size * sizeof(TCHAR));
if (res == NULL) {
mir_free(szUniqueID);
diff --git a/plugins/Variables/src/parse_system.cpp b/plugins/Variables/src/parse_system.cpp index 026007a10f..69053bba1b 100644 --- a/plugins/Variables/src/parse_system.cpp +++ b/plugins/Variables/src/parse_system.cpp @@ -54,7 +54,7 @@ static TCHAR *parseCpuLoad(ARGUMENTSINFO *ai) { if ( _tcslen(ai->targv[1]) == 0)
szCounter = mir_tstrdup(_T("\\Processor(_Total)\\% Processor Time"));
else {
- int size = _tcslen(ai->targv[1]) + 32;
+ int size = (int)_tcslen(ai->targv[1]) + 32;
szCounter = (TCHAR *)mir_alloc(size * sizeof(TCHAR));
if (szCounter == NULL)
return NULL;
|