diff options
author | Mataes <mataes2007@gmail.com> | 2018-12-08 18:46:30 +0300 |
---|---|---|
committer | Mataes <mataes2007@gmail.com> | 2018-12-08 18:46:50 +0300 |
commit | b460f81984603c537b69eb9340e1236fbd74dc5c (patch) | |
tree | 7eb133ed9e6a684523dc739656f82a6889b97ae5 /plugins | |
parent | 3fde828aa82d85a52ea32af85104fd97ed0257e8 (diff) |
NewsAggregator: few warnings fix
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/NewsAggregator/Src/Authentication.cpp | 2 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/CheckFeed.cpp | 6 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Services.cpp | 14 |
3 files changed, 11 insertions, 11 deletions
diff --git a/plugins/NewsAggregator/Src/Authentication.cpp b/plugins/NewsAggregator/Src/Authentication.cpp index 5e16abb3b8..f76df7eba9 100644 --- a/plugins/NewsAggregator/Src/Authentication.cpp +++ b/plugins/NewsAggregator/Src/Authentication.cpp @@ -39,7 +39,7 @@ void CreateAuthString(char *auth, MCONTACT hContact, CFeedEditor *pDlg) mir_free(tlogin);
mir_free(tpass);
- mir_snprintf(auth, 250, "Basic %s", ptrA(mir_base64_encode(str, len)));
+ mir_snprintf(auth, 250, "Basic %s", ptrA(mir_base64_encode(str, (size_t)len)));
}
CAuthRequest::CAuthRequest(CFeedEditor *pDlg, MCONTACT hContact) :
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index 9371609b63..6b5ee1afac 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -394,7 +394,7 @@ void CheckCurrentFeed(MCONTACT hContact) double deltaupd = difftime(time(0), stamp);
double deltacheck = difftime(time(0), (time_t)g_plugin.getDword(hContact, "LastCheck"));
if (deltaupd - deltacheck >= 0) {
- g_plugin.setDword(hContact, "LastCheck", time(0));
+ g_plugin.setDword(hContact, "LastCheck", (DWORD)time(0));
xmlDestroyNode(hXml);
return;
}
@@ -527,7 +527,7 @@ void CheckCurrentFeed(MCONTACT hContact) double deltaupd = difftime(time(0), stamp);
double deltacheck = difftime(time(0), (time_t)g_plugin.getDword(hContact, "LastCheck"));
if (deltaupd - deltacheck >= 0) {
- g_plugin.setDword(hContact, "LastCheck", time(0));
+ g_plugin.setDword(hContact, "LastCheck", (DWORD)time(0));
xmlDestroyNode(hXml);
return;
}
@@ -600,7 +600,7 @@ void CheckCurrentFeed(MCONTACT hContact) xmlDestroyNode(hXml);
}
}
- g_plugin.setDword(hContact, "LastCheck", time(0));
+ g_plugin.setDword(hContact, "LastCheck", (DWORD)time(0));
}
void CheckCurrentFeedAvatar(MCONTACT hContact)
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index c0c5b02967..36993622b6 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -38,7 +38,7 @@ int NewsAggrInit(WPARAM, LPARAM) for (auto &hContact : Contacts(MODULENAME)) {
if (!g_plugin.getByte("StartupRetrieve", 1))
- g_plugin.setDword(hContact, "LastCheck", time(0));
+ g_plugin.setDword(hContact, "LastCheck", (DWORD)time(0));
g_plugin.setWord(hContact, "Status", ID_STATUS_ONLINE);
}
@@ -90,7 +90,7 @@ INT_PTR NewsAggrGetCaps(WPARAM wp, LPARAM) INT_PTR NewsAggrSetStatus(WPARAM wp, LPARAM)
{
- int nStatus = wp;
+ int nStatus = (int)wp;
if ((ID_STATUS_ONLINE == nStatus) || (ID_STATUS_OFFLINE == nStatus)) {
int nOldStatus = g_nStatus;
if(nStatus != g_nStatus) {
@@ -99,7 +99,7 @@ INT_PTR NewsAggrSetStatus(WPARAM wp, LPARAM) for (auto &hContact : Contacts(MODULENAME))
g_plugin.setWord(hContact, "Status", nStatus);
- ProtoBroadcastAck(MODULENAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, g_nStatus);
+ ProtoBroadcastAck(MODULENAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, (LPARAM)g_nStatus);
}
}
@@ -119,7 +119,7 @@ INT_PTR NewsAggrLoadIcon(WPARAM wParam, LPARAM) static void __cdecl AckThreadProc(void *param)
{
Sleep(100);
- ProtoBroadcastAck(MODULENAME, (UINT_PTR)param, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(MODULENAME, (MCONTACT)param, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
INT_PTR NewsAggrGetInfo(WPARAM, LPARAM lParam)
@@ -164,7 +164,7 @@ INT_PTR ChangeFeed(WPARAM hContact, LPARAM) pDlg = it;
if (pDlg == nullptr) {
- pDlg = new CFeedEditor(-1, nullptr, hContact);
+ pDlg = new CFeedEditor(-1, nullptr, (MCONTACT)hContact);
pDlg->Show();
}
else {
@@ -192,8 +192,8 @@ INT_PTR ExportFeeds(WPARAM, LPARAM) INT_PTR CheckFeed(WPARAM hContact, LPARAM)
{
- if(IsMyContact(hContact))
- UpdateListAdd(hContact);
+ if(IsMyContact((MCONTACT)hContact))
+ UpdateListAdd((MCONTACT)hContact);
if ( !ThreadRunning)
mir_forkthread(UpdateThreadProc);
return 0;
|