summaryrefslogtreecommitdiff
path: root/protocols/Twitter
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-10 10:44:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-10 10:44:04 +0000
commit8c2cf8fada9a01f749f6f96f177fdb1f590e5393 (patch)
treee3ad5464a1df2ab255102c477df2360f4aba6778 /protocols/Twitter
parentddf46f560f63f43aedc6464edad759cc3a711d4b (diff)
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@377 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter')
-rw-r--r--protocols/Twitter/main.cpp4
-rw-r--r--protocols/Twitter/oauth.cpp8
-rw-r--r--protocols/Twitter/proto.cpp6
-rw-r--r--protocols/Twitter/ui.cpp6
-rw-r--r--protocols/Twitter/utility.cpp6
5 files changed, 15 insertions, 15 deletions
diff --git a/protocols/Twitter/main.cpp b/protocols/Twitter/main.cpp
index be8eff5ce5..077b54a0fa 100644
--- a/protocols/Twitter/main.cpp
+++ b/protocols/Twitter/main.cpp
@@ -108,7 +108,7 @@ int OnModulesLoaded(WPARAM,LPARAM)
upd.szBetaVersionURL = "http://twosx.net/mim/twitter/updater/version.html";
upd.szBetaChangelogURL = "http://twosx.net/mim/twitter/updater/changelog.html";
upd.pbBetaVersionPrefix = reinterpret_cast<BYTE*>("Twitter ");
- upd.cpbBetaVersionPrefix = strlen(reinterpret_cast<char*>(upd.pbBetaVersionPrefix));
+ upd.cpbBetaVersionPrefix = (int)strlen(reinterpret_cast<char*>(upd.pbBetaVersionPrefix));
#ifdef UNICODE
upd.szBetaUpdateURL = "http://twosx.net/mim/twitter/updater/twitter.zip";
#else
@@ -117,7 +117,7 @@ int OnModulesLoaded(WPARAM,LPARAM)
upd.pbVersion = reinterpret_cast<BYTE*>( CreateVersionStringPlugin(
reinterpret_cast<PLUGININFO*>(&pluginInfo),curr_version) );
- upd.cpbVersion = strlen(reinterpret_cast<char*>(upd.pbVersion));
+ upd.cpbVersion = (int)strlen(reinterpret_cast<char*>(upd.pbVersion));
CallService(MS_UPDATE_REGISTER,0,(LPARAM)&upd);
}
diff --git a/protocols/Twitter/oauth.cpp b/protocols/Twitter/oauth.cpp
index d67ec4ce22..2235ca88ce 100644
--- a/protocols/Twitter/oauth.cpp
+++ b/protocols/Twitter/oauth.cpp
@@ -496,7 +496,7 @@ string mir_twitter::HMACSHA1( const string& keyBytes, const string& data )
if (!CryptHashData(
hHash, // handle of the hash object
(BYTE*)keyBytes.c_str(), // password to hash
- keyBytes.size(), // number of bytes of data to add
+ (DWORD)keyBytes.size(), // number of bytes of data to add
0)) // flags
{
_TRACE("Error in CryptHashData 0x%08x \n",
@@ -522,7 +522,7 @@ string mir_twitter::HMACSHA1( const string& keyBytes, const string& data )
* be able to import longer keys (HMAC-SHA1 uses 20-byte key).
*/
key_blob.hdr.aiKeyAlg = CALG_RC2;
- key_blob.len = keyBytes.size();
+ key_blob.len = (DWORD)keyBytes.size();
ZeroMemory(key_blob.key, sizeof(key_blob.key));
_ASSERTE(keyBytes.size() <= SIZEOF(key_blob.key));
@@ -578,7 +578,7 @@ string mir_twitter::HMACSHA1( const string& keyBytes, const string& data )
if (!CryptHashData(
hHmacHash, // handle of the HMAC hash object
(BYTE*)data.c_str(), // message to hash
- data.size(), // number of bytes of data to add
+ (DWORD)data.size(), // number of bytes of data to add
0)) // flags
{
_TRACE("Error in CryptHashData 0x%08x \n",
@@ -646,7 +646,7 @@ ErrorExit:
wstring mir_twitter::Base64String( const string& hash )
{
Base64Coder coder;
- coder.Encode((BYTE*)hash.c_str(), hash.size());
+ coder.Encode((BYTE*)hash.c_str(), (DWORD)hash.size());
wstring encoded = UTF8ToWide(coder.EncodedMessage());
return encoded;
}
diff --git a/protocols/Twitter/proto.cpp b/protocols/Twitter/proto.cpp
index 420193fb81..b90b9b477b 100644
--- a/protocols/Twitter/proto.cpp
+++ b/protocols/Twitter/proto.cpp
@@ -149,7 +149,7 @@ HICON TwitterProto::GetIcon(int index)
int TwitterProto::RecvMsg(HANDLE hContact,PROTORECVEVENT *pre)
{
CCSDATA ccs = { hContact,PSR_MESSAGE,0,reinterpret_cast<LPARAM>(pre) };
- return CallService(MS_PROTO_RECVMSG,0,reinterpret_cast<LPARAM>(&ccs));
+ return (int)CallService(MS_PROTO_RECVMSG,0,reinterpret_cast<LPARAM>(&ccs));
}
// *************************
@@ -258,7 +258,7 @@ int TwitterProto::SvcCreateAccMgrUI(WPARAM wParam,LPARAM lParam)
int TwitterProto::GetName(WPARAM wParam,LPARAM lParam)
{
- lstrcpynA(reinterpret_cast<char*>(lParam),m_szProtoName,wParam);
+ lstrcpynA(reinterpret_cast<char*>(lParam), m_szProtoName, (int)wParam);
return 0;
}
@@ -516,7 +516,7 @@ int TwitterProto::LOG(const char *fmt,...)
mir_vsnprintf(text,sizeof(text),fmt,va);
va_end(va);
- return CallService(MS_NETLIB_LOG,(WPARAM)hNetlib_,(LPARAM)text);
+ return CallService(MS_NETLIB_LOG, (WPARAM)hNetlib_, (LPARAM)text);
}
int TwitterProto::WLOG(const char* first, const wstring last)
diff --git a/protocols/Twitter/ui.cpp b/protocols/Twitter/ui.cpp
index 588e73d502..872d5feb1e 100644
--- a/protocols/Twitter/ui.cpp
+++ b/protocols/Twitter/ui.cpp
@@ -350,7 +350,7 @@ namespace popup_options
return GetSysColor(COLOR_WINDOWTEXT);
}
else if(IsDlgButtonChecked(hwndDlg,IDC_COL_CUSTOM))
- return SendDlgItemMessage(hwndDlg,IDC_COLTEXT,CPM_GETCOLOUR,0,0);
+ return (COLORREF)SendDlgItemMessage(hwndDlg,IDC_COLTEXT,CPM_GETCOLOUR,0,0);
else // Default checked (probably)
return 0;
}
@@ -365,7 +365,7 @@ namespace popup_options
return GetSysColor(COLOR_WINDOW);
}
else if(IsDlgButtonChecked(hwndDlg,IDC_COL_CUSTOM))
- return SendDlgItemMessage(hwndDlg,IDC_COLBACK,CPM_GETCOLOUR,0,0);
+ return (COLORREF)SendDlgItemMessage(hwndDlg,IDC_COLBACK,CPM_GETCOLOUR,0,0);
else // Default checked (probably)
return 0;
}
@@ -394,7 +394,7 @@ namespace popup_options
// Pick a random contact
HANDLE hContact = 0;
- int n_contacts = CallService(MS_DB_CONTACT_GETCOUNT,0,0);
+ int n_contacts = (int)CallService(MS_DB_CONTACT_GETCOUNT,0,0);
if(n_contacts != 0)
{
diff --git a/protocols/Twitter/utility.cpp b/protocols/Twitter/utility.cpp
index 0c9377d7c4..2f79a40e99 100644
--- a/protocols/Twitter/utility.cpp
+++ b/protocols/Twitter/utility.cpp
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
std::string b64encode(const std::string &s)
{
NETLIBBASE64 encode;
- encode.cbDecoded = s.length();
+ encode.cbDecoded = (int)s.length();
encode.pbDecoded = (BYTE*)s.c_str();
encode.cchEncoded = Netlib_GetBase64EncodedBufferSize(encode.cbDecoded);
encode.pszEncoded = new char[encode.cchEncoded+1];
@@ -122,7 +122,7 @@ http::response mir_twitter::slurp(const std::string &url,http::method meth,
pdata_STR = WideToUTF8(pdata_WSTR);
req.headersCount = 3;
- req.dataLength = pdata_STR.size();
+ req.dataLength = (int)pdata_STR.size();
req.pData = const_cast<char*>(pdata_STR.c_str());
LOG("**SLURP::POST - req.pdata is %s", req.pData);
}
@@ -162,7 +162,7 @@ int mir_twitter::LOG(const char *fmt,...)
mir_vsnprintf(text,sizeof(text),fmt,va);
va_end(va);
- return CallService(MS_NETLIB_LOG,(WPARAM)handle_,(LPARAM)text);
+ return (int)CallService(MS_NETLIB_LOG,(WPARAM)handle_,(LPARAM)text);
}
int mir_twitter::WLOG(const char* first, const std::wstring last)