diff options
-rw-r--r-- | plugins/Variables/src/parse_regexp.cpp | 4 | ||||
-rw-r--r-- | plugins/helpers/gen_helpers.h | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_secur.cpp | 18 |
3 files changed, 12 insertions, 18 deletions
diff --git a/plugins/Variables/src/parse_regexp.cpp b/plugins/Variables/src/parse_regexp.cpp index 025daeb84a..4e6fab89e0 100644 --- a/plugins/Variables/src/parse_regexp.cpp +++ b/plugins/Variables/src/parse_regexp.cpp @@ -39,7 +39,7 @@ static TCHAR *parseRegExpCheck(ARGUMENTSINFO *ai) return NULL;
pcre16_extra *extra = pcre16_study(ppat, 0, &err);
- int nmat = pcre16_exec(ppat, extra, ai->targv[2], mir_tstrlen(ai->targv[2]), 0, 0, offsets, 99);
+ int nmat = pcre16_exec(ppat, extra, ai->targv[2], (int)mir_tstrlen(ai->targv[2]), 0, 0, offsets, 99);
if (nmat > 0) {
ai->flags &= ~AIF_FALSE;
_ltoa(nmat, szVal, 10);
@@ -72,7 +72,7 @@ static TCHAR *parseRegExpSubstr(ARGUMENTSINFO *ai) return NULL;
pcre16_extra *extra = pcre16_study(ppat, 0, &err);
- int nmat = pcre16_exec(ppat, extra, ai->targv[2], mir_tstrlen(ai->targv[2]), 0, 0, offsets, 99);
+ int nmat = pcre16_exec(ppat, extra, ai->targv[2], (int)mir_tstrlen(ai->targv[2]), 0, 0, offsets, 99);
if (nmat >= 0)
ai->flags &= ~AIF_FALSE;
diff --git a/plugins/helpers/gen_helpers.h b/plugins/helpers/gen_helpers.h index c4c46dc6bd..f084929244 100644 --- a/plugins/helpers/gen_helpers.h +++ b/plugins/helpers/gen_helpers.h @@ -46,16 +46,16 @@ int AddDebugLogMessage(const TCHAR* fmt, ...); #define log_debugA AddDebugLogMessageA
#define log_debug AddDebugLogMessage
#else
-static __inline int log_debugA(const char* fmt, ...) { return 0; }
-static __inline int log_debug(const TCHAR* fmt, ...) { return 0; }
+static __inline int log_debugA(const char*, ...) { return 0; }
+static __inline int log_debug(const TCHAR*, ...) { return 0; }
#endif
#if LOGLEVEL >= __LOGLEVEL_INFO
#define log_infoA AddDebugLogMessageA
#define log_info AddDebugLogMessage
#else
-static __inline int log_infoA(const char* fmt, ...) { return 0; }
-static __inline int log_info(const TCHAR* fmt, ...) { return 0; }
+static __inline int log_infoA(const char*, ...) { return 0; }
+static __inline int log_info(const TCHAR*, ...) { return 0; }
#endif
#endif
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index d8112927ae..688ffb1fc5 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -106,13 +106,10 @@ char* TNtlmAuth::getInitialRequest() return NULL;
// This generates login method advertisement packet
- char* result;
if (info->conn.password[0] != 0)
- result = Netlib_NtlmCreateResponse2(hProvider, "", info->conn.username, info->conn.password, &complete);
- else
- result = Netlib_NtlmCreateResponse2(hProvider, "", NULL, NULL, &complete);
+ return Netlib_NtlmCreateResponse2(hProvider, "", info->conn.username, info->conn.password, &complete);
- return result;
+ return Netlib_NtlmCreateResponse2(hProvider, "", NULL, NULL, &complete);
}
char* TNtlmAuth::getChallenge(const TCHAR *challenge)
@@ -120,14 +117,11 @@ char* TNtlmAuth::getChallenge(const TCHAR *challenge) if (!hProvider)
return NULL;
- char *text = (!mir_tstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge), *result;
+ ptrA text((!mir_tstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge));
if (info->conn.password[0] != 0)
- result = Netlib_NtlmCreateResponse2(hProvider, text, info->conn.username, info->conn.password, &complete);
- else
- result = Netlib_NtlmCreateResponse2(hProvider, text, NULL, NULL, &complete);
-
- mir_free(text);
- return result;
+ return Netlib_NtlmCreateResponse2(hProvider, text, info->conn.username, info->conn.password, &complete);
+
+ return Netlib_NtlmCreateResponse2(hProvider, text, NULL, NULL, &complete);
}
/////////////////////////////////////////////////////////////////////////////////////////
|