From 05cb3ed52210da707e2bf42d4d1eccb0ea55f4af Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 6 Dec 2012 19:19:57 +0000 Subject: warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@2670 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CryptoPP/src/base64.cpp | 2 +- plugins/CryptoPP/src/base64.h | 2 +- plugins/CryptoPP/src/cpp_gpgw.cpp | 4 ++-- plugins/CryptoPP/src/cpp_pgpw.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/CryptoPP/src') diff --git a/plugins/CryptoPP/src/base64.cpp b/plugins/CryptoPP/src/base64.cpp index 7495dd234f..92f23ba64b 100644 --- a/plugins/CryptoPP/src/base64.cpp +++ b/plugins/CryptoPP/src/base64.cpp @@ -11,7 +11,7 @@ string base64encode(const string buf) } -char *base64encode(const char *inBuffer, const int count) { +char *base64encode(const char *inBuffer, const size_t count) { int srcIndex = 0, destIndex = 0, remainder = count % 3; char *outBuffer = (char *) malloc(count*2+1); diff --git a/plugins/CryptoPP/src/base64.h b/plugins/CryptoPP/src/base64.h index 1024ecbbd7..8be9cbc4fa 100644 --- a/plugins/CryptoPP/src/base64.h +++ b/plugins/CryptoPP/src/base64.h @@ -44,7 +44,7 @@ static const byte asciiToBin64[] = static const byte binToAscii64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -char *base64encode(const char *, const int); +char *base64encode(const char *, const size_t); char *base64decode(const char *, size_t *); string base64encode(const string); diff --git a/plugins/CryptoPP/src/cpp_gpgw.cpp b/plugins/CryptoPP/src/cpp_gpgw.cpp index 0ef3d77626..e6a5899fc2 100644 --- a/plugins/CryptoPP/src/cpp_gpgw.cpp +++ b/plugins/CryptoPP/src/cpp_gpgw.cpp @@ -240,7 +240,7 @@ LPSTR __cdecl gpg_encode(HANDLE context, LPCSTR szPlainMsg) LPSTR szUtfMsg; if ( ptr->mode & MODE_GPG_ANSI ) { LPWSTR wszMsg = utf8decode(szPlainMsg); - size_t wlen = wcslen(wszMsg)+1; + int wlen = (int)wcslen(wszMsg)+1; szUtfMsg = (LPSTR) alloca(wlen); WideCharToMultiByte(CP_ACP, 0, wszMsg, -1, szUtfMsg, wlen, 0, 0); } @@ -261,7 +261,7 @@ LPSTR __cdecl gpg_decode(HANDLE context, LPCSTR szEncMsg) if (szOldMsg) { if ( !is_7bit_string(szOldMsg) && !is_utf8_string(szOldMsg) ) { - size_t slen = strlen(szOldMsg)+1; + int slen = (int)strlen(szOldMsg)+1; LPWSTR wszMsg = (LPWSTR) alloca(slen*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wszMsg, slen*sizeof(WCHAR)); szNewMsg = _strdup(utf8encode(wszMsg)); diff --git a/plugins/CryptoPP/src/cpp_pgpw.cpp b/plugins/CryptoPP/src/cpp_pgpw.cpp index 8633690009..7a70a99607 100644 --- a/plugins/CryptoPP/src/cpp_pgpw.cpp +++ b/plugins/CryptoPP/src/cpp_pgpw.cpp @@ -258,7 +258,7 @@ LPSTR __cdecl pgp_decode(HANDLE context, LPCSTR szEncMsg) if (szOldMsg) { if ( !is_7bit_string(szOldMsg) && !is_utf8_string(szOldMsg) ) { - size_t slen = strlen(szOldMsg)+1; + int slen = (int)strlen(szOldMsg)+1; LPWSTR wszMsg = (LPWSTR) alloca(slen*sizeof(WCHAR)); MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wszMsg, slen*sizeof(WCHAR)); szNewMsg = _strdup(utf8encode(wszMsg)); -- cgit v1.2.3