summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/NewsAggregator/Src/CheckFeed.cpp6
-rw-r--r--plugins/NewsAggregator/Src/ExportImport.cpp84
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp8
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp12
4 files changed, 55 insertions, 55 deletions
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp
index b1efb248b6..1920ff7f4c 100644
--- a/plugins/NewsAggregator/Src/CheckFeed.cpp
+++ b/plugins/NewsAggregator/Src/CheckFeed.cpp
@@ -129,7 +129,7 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin
for (HANDLE hDbEvent = db_event_last(hContact); hDbEvent; hDbEvent = db_event_prev(hContact, hDbEvent)) {
olddbei.cbBlob = db_event_getBlobSize(hDbEvent);
if (olddbei.cbBlob > cbMemoLen)
- pbBuffer = (PBYTE)mir_realloc(pbBuffer, cbMemoLen = olddbei.cbBlob);
+ pbBuffer = (PBYTE)mir_realloc(pbBuffer, (size_t)(cbMemoLen = olddbei.cbBlob));
olddbei.pBlob = pbBuffer;
db_event_get(hDbEvent, &olddbei);
@@ -137,7 +137,7 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin
if (stamp > 0 && olddbei.timestamp < (DWORD)stamp)
break;
- if (strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) {
+ if ((DWORD)strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) {
MesExist = true;
break;
}
@@ -150,7 +150,7 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin
PROTORECVEVENT recv = { 0 };
recv.flags = PREF_TCHAR;
- recv.timestamp = stamp;
+ recv.timestamp = (DWORD)stamp;
recv.tszMessage = message;
ProtoChainRecvMsg(hContact, &recv);
}
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp
index e17e8196da..a68015e514 100644
--- a/plugins/NewsAggregator/Src/ExportImport.cpp
+++ b/plugins/NewsAggregator/Src/ExportImport.cpp
@@ -27,7 +27,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG)lParam);
Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE, "ImportDlg");
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), FALSE);
@@ -50,7 +50,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
HXML node = xi.getChildByPath(hXml, _T("opml/body/outline"), 0);
if ( !node)
node = xi.getChildByPath(hXml, _T("body/outline"), 0);
- int count = SendMessage(FeedsImportList, LB_GETCOUNT, 0, 0);
+ int count = (int)SendMessage(FeedsImportList, LB_GETCOUNT, 0, 0);
int DUPES = 0;
if (node) {
while (node) {
@@ -87,7 +87,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
- SendMessage(FeedsImportList, LB_GETTEXT, i, (LPARAM)item);
+ SendMessage(FeedsImportList, LB_GETTEXT, (WPARAM)i, (LPARAM)item);
if (!mir_tstrcmpi(item, text)) {
NeedToImport = TRUE;
break;
@@ -149,7 +149,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
}
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)MODULE);
+ CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)MODULE);
db_set_ts(hContact, MODULE, "Nick", text);
db_set_ts(hContact, MODULE, "URL", url);
db_set_ts(hContact, MODULE, "Homepage", siteurl);
@@ -324,11 +324,11 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDOK)))
EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
- int cursel = SendMessage(FeedsList, LB_GETCURSEL, 0, 0);
+ int cursel = (int)SendMessage(FeedsList, LB_GETCURSEL, 0, 0);
TCHAR item[MAX_PATH];
- SendMessage(FeedsList, LB_GETTEXT, cursel, (LPARAM)item);
+ SendMessage(FeedsList, LB_GETTEXT, (WPARAM)cursel, (LPARAM)item);
SendMessage(FeedsImportList, LB_ADDSTRING, 0, (LPARAM)item);
- SendMessage(FeedsList, LB_DELETESTRING, cursel, 0);
+ SendMessage(FeedsList, LB_DELETESTRING, (WPARAM)cursel, 0);
if (!SendMessage(FeedsList, LB_GETCOUNT, 0, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), FALSE);
@@ -342,11 +342,11 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS)))
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), TRUE);
- int cursel = SendMessage(FeedsImportList, LB_GETCURSEL, 0, 0);
+ int cursel = (int)SendMessage(FeedsImportList, LB_GETCURSEL, 0, 0);
TCHAR item[MAX_PATH];
- SendMessage(FeedsImportList, LB_GETTEXT, cursel, (LPARAM)item);
+ SendMessage(FeedsImportList, LB_GETTEXT, (WPARAM)cursel, (LPARAM)item);
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)item);
- SendMessage(FeedsImportList, LB_DELETESTRING, cursel, 0);
+ SendMessage(FeedsImportList, LB_DELETESTRING, (WPARAM)cursel, 0);
if (!SendMessage(FeedsImportList, LB_GETCOUNT, 0, 0))
{
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE);
@@ -364,14 +364,14 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDOK)))
EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
- int count = SendMessage(FeedsList, LB_GETCOUNT, 0, 0);
+ int count = (int)SendMessage(FeedsList, LB_GETCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
- SendMessage(FeedsList, LB_GETTEXT, i, (LPARAM)item);
+ SendMessage(FeedsList, LB_GETTEXT, (WPARAM)i, (LPARAM)item);
SendMessage(FeedsImportList, LB_ADDSTRING, 0, (LPARAM)item);
}
for (int i = count - 1; i > -1; i--)
- SendMessage(FeedsList, LB_DELETESTRING, i, 0);
+ SendMessage(FeedsList, LB_DELETESTRING, (WPARAM)i, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), FALSE);
}
@@ -383,14 +383,14 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS)))
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), TRUE);
- int count = SendMessage(FeedsImportList, LB_GETCOUNT, 0, 0);
+ int count = (int)SendMessage(FeedsImportList, LB_GETCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
- SendMessage(FeedsImportList, LB_GETTEXT, i, (LPARAM)item);
+ SendMessage(FeedsImportList, LB_GETTEXT, (WPARAM)i, (LPARAM)item);
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)item);
}
for (int i = count - 1; i > -1; i--)
- SendMessage(FeedsImportList, LB_DELETESTRING, i, 0);
+ SendMessage(FeedsImportList, LB_DELETESTRING, (WPARAM)i, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
@@ -407,11 +407,11 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDOK)))
EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
- int cursel = SendMessage(FeedsList, LB_GETCURSEL, 0, 0);
+ int cursel = (int)SendMessage(FeedsList, LB_GETCURSEL, 0, 0);
TCHAR item[MAX_PATH];
- SendMessage(FeedsList, LB_GETTEXT, cursel, (LPARAM)item);
+ SendMessage(FeedsList, LB_GETTEXT, (WPARAM)cursel, (LPARAM)item);
SendMessage(FeedsImportList, LB_ADDSTRING, 0, (LPARAM)item);
- SendMessage(FeedsList, LB_DELETESTRING, cursel, 0);
+ SendMessage(FeedsList, LB_DELETESTRING, (WPARAM)cursel, 0);
if (!SendMessage(FeedsList, LB_GETCOUNT, 0, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), FALSE);
@@ -428,11 +428,11 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS)))
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), TRUE);
- int cursel = SendMessage(FeedsImportList, LB_GETCURSEL, 0, 0);
+ int cursel = (int)SendMessage(FeedsImportList, LB_GETCURSEL, 0, 0);
TCHAR item[MAX_PATH];
- SendMessage(FeedsImportList, LB_GETTEXT, cursel, (LPARAM)item);
+ SendMessage(FeedsImportList, LB_GETTEXT, (WPARAM)cursel, (LPARAM)item);
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)item);
- SendMessage(FeedsImportList, LB_DELETESTRING, cursel, 0);
+ SendMessage(FeedsImportList, LB_DELETESTRING, (WPARAM)cursel, 0);
if (!SendMessage(FeedsImportList, LB_GETCOUNT, 0, 0))
{
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE);
@@ -510,10 +510,10 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
xi.addChild(header, _T("title"), _T("Miranda NG NewsAggregator plugin export"));
header = xi.addChild(hXml, _T("body"), NULL);
- int count = SendMessage(FeedsExportList, LB_GETCOUNT, 0, 0);
+ int count = (int)SendMessage(FeedsExportList, LB_GETCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
- SendMessage(FeedsExportList, LB_GETTEXT, i, (LPARAM)item);
+ SendMessage(FeedsExportList, LB_GETTEXT, (WPARAM)i, (LPARAM)item);
MCONTACT hContact = GetContactByNick(item);
TCHAR
*title = db_get_tsa(hContact, MODULE, "Nick"),
@@ -570,11 +570,11 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDOK)))
EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
- int cursel = SendMessage(FeedsList, LB_GETCURSEL, 0, 0);
+ int cursel = (int)SendMessage(FeedsList, LB_GETCURSEL, 0, 0);
TCHAR item[MAX_PATH];
- SendMessage(FeedsList, LB_GETTEXT, cursel, (LPARAM)item);
+ SendMessage(FeedsList, LB_GETTEXT, (WPARAM)cursel, (LPARAM)item);
SendMessage(FeedsExportList, LB_ADDSTRING, 0, (LPARAM)item);
- SendMessage(FeedsList, LB_DELETESTRING, cursel, 0);
+ SendMessage(FeedsList, LB_DELETESTRING, (WPARAM)cursel, 0);
if (!SendMessage(FeedsList, LB_GETCOUNT, 0, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), FALSE);
@@ -588,11 +588,11 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS)))
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), TRUE);
- int cursel = SendMessage(FeedsExportList, LB_GETCURSEL, 0, 0);
+ int cursel = (int)SendMessage(FeedsExportList, LB_GETCURSEL, 0, 0);
TCHAR item[MAX_PATH];
- SendMessage(FeedsExportList, LB_GETTEXT, cursel, (LPARAM)item);
+ SendMessage(FeedsExportList, LB_GETTEXT, (WPARAM)cursel, (LPARAM)item);
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)item);
- SendMessage(FeedsExportList, LB_DELETESTRING, cursel, 0);
+ SendMessage(FeedsExportList, LB_DELETESTRING, (WPARAM)cursel, 0);
if (!SendMessage(FeedsExportList, LB_GETCOUNT, 0, 0))
{
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE);
@@ -610,14 +610,14 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDOK)))
EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
- int count = SendMessage(FeedsList, LB_GETCOUNT, 0, 0);
+ int count = (int)SendMessage(FeedsList, LB_GETCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
- SendMessage(FeedsList, LB_GETTEXT, i, (LPARAM)item);
+ SendMessage(FeedsList, LB_GETTEXT, (WPARAM)i, (LPARAM)item);
SendMessage(FeedsExportList, LB_ADDSTRING, 0, (LPARAM)item);
}
for (int i = count - 1; i > -1; i--)
- SendMessage(FeedsList, LB_DELETESTRING, i, 0);
+ SendMessage(FeedsList, LB_DELETESTRING, (WPARAM)i, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), FALSE);
}
@@ -629,14 +629,14 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS)))
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), TRUE);
- int count = SendMessage(FeedsExportList, LB_GETCOUNT, 0, 0);
+ int count = (int)SendMessage(FeedsExportList, LB_GETCOUNT, 0, 0);
for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
- SendMessage(FeedsExportList, LB_GETTEXT, i, (LPARAM)item);
+ SendMessage(FeedsExportList, LB_GETTEXT, (WPARAM)i, (LPARAM)item);
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)item);
}
for (int i = count - 1; i > -1; i--)
- SendMessage(FeedsExportList, LB_DELETESTRING, i, 0);
+ SendMessage(FeedsExportList, LB_DELETESTRING, (WPARAM)i, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
@@ -653,11 +653,11 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEALLFEEDS), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDOK)))
EnableWindow(GetDlgItem(hwndDlg, IDOK), TRUE);
- int cursel = SendMessage(FeedsList, LB_GETCURSEL, 0, 0);
+ int cursel = (int)SendMessage(FeedsList, LB_GETCURSEL, 0, 0);
TCHAR item[MAX_PATH];
- SendMessage(FeedsList, LB_GETTEXT, cursel, (LPARAM)item);
+ SendMessage(FeedsList, LB_GETTEXT, (WPARAM)cursel, (LPARAM)item);
SendMessage(FeedsExportList, LB_ADDSTRING, 0, (LPARAM)item);
- SendMessage(FeedsList, LB_DELETESTRING, cursel, 0);
+ SendMessage(FeedsList, LB_DELETESTRING, (WPARAM)cursel, 0);
if (!SendMessage(FeedsList, LB_GETCOUNT, 0, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), FALSE);
@@ -674,11 +674,11 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDFEED), TRUE);
if (!IsWindowEnabled(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS)))
EnableWindow(GetDlgItem(hwndDlg, IDC_ADDALLFEEDS), TRUE);
- int cursel = SendMessage(FeedsExportList, LB_GETCURSEL, 0, 0);
+ int cursel = (int)SendMessage(FeedsExportList, LB_GETCURSEL, 0, 0);
TCHAR item[MAX_PATH];
- SendMessage(FeedsExportList, LB_GETTEXT, cursel, (LPARAM)item);
+ SendMessage(FeedsExportList, LB_GETTEXT, (WPARAM)cursel, (LPARAM)item);
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)item);
- SendMessage(FeedsExportList, LB_DELETESTRING, cursel, 0);
+ SendMessage(FeedsExportList, LB_DELETESTRING, (WPARAM)cursel, 0);
if (!SendMessage(FeedsExportList, LB_GETCOUNT, 0, 0))
{
EnableWindow(GetDlgItem(hwndDlg, IDC_REMOVEFEED), FALSE);
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index 15a712fa6f..5c6f582bce 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -24,7 +24,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
SetWindowText(hwndDlg, TranslateT("Add Feed"));
SetDlgItemText(hwndDlg, IDC_FEEDURL, _T("http://"));
SetDlgItemText(hwndDlg, IDC_TAGSEDIT, TAGSDEFAULT);
@@ -54,7 +54,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)MODULE);
+ CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)MODULE);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str));
db_set_ts(hContact, MODULE, "Nick", str);
@@ -315,7 +315,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SetWindowText(hwndDlg, TranslateT("Change Feed"));
SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, UDM_SETRANGE32, 0, 999);
- MCONTACT hContact = lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
WindowList_Add(hChangeFeedDlgList, hwndDlg, hContact);
Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, MODULE, "ChangeDlg");
@@ -512,7 +512,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
if (mir_tstrcmp(dbURL, url))
continue;
- CallService(MS_DB_CONTACT_DELETE, hContact, 0);
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
ListView_DeleteItem(hwndList, sel);
break;
}
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index 601156e5ca..590a1fbabd 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -86,8 +86,8 @@ void GetNewsData(TCHAR *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg)
if (nlhrReply->resultCode == 200 && nlhrReply->dataLength > 0) {
Netlib_LogfT(hNetlibUser,_T("Code 200: Succeeded getting feed data %s."), tszUrl);
// allocate memory and save the retrieved data
- *szData = (char *)mir_alloc(nlhrReply->dataLength + 2);
- memcpy(*szData, nlhrReply->pData, nlhrReply->dataLength);
+ *szData = (char *)mir_alloc((size_t)(nlhrReply->dataLength + 2));
+ memcpy(*szData, nlhrReply->pData, (size_t)nlhrReply->dataLength);
(*szData)[nlhrReply->dataLength] = 0;
}
else if (nlhrReply->resultCode == 401) {
@@ -280,7 +280,7 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType)
t = mktime(&timestamp);
_tzset();
- t -= _timezone;
+ t -= (time_t)_timezone;
return (t >= 0) ? t : 0;
}
@@ -319,7 +319,7 @@ int StrReplace(TCHAR *lpszOld, const TCHAR *lpszNew, TCHAR *&lpszStr)
size_t nNewLen = _tcslen(lpszNew);
// loop once to figure out the size of the result string
- int nCount = 0;
+ size_t nCount = 0;
TCHAR *pszStart = (TCHAR *)lpszStr;
TCHAR *pszEnd = (TCHAR *)lpszStr + nStrLen;
TCHAR *pszTarget = NULL;
@@ -347,7 +347,7 @@ int StrReplace(TCHAR *lpszOld, const TCHAR *lpszNew, TCHAR *&lpszStr)
// loop again to actually do the work
while (pszStart < pszEnd) {
while ((pszTarget = _tcsistr(pszStart, lpszOld)) != NULL) {
- int nCopyLen = (int)(pszTarget - pszStart);
+ size_t nCopyLen = (size_t)(pszTarget - pszStart);
_tcsncpy(cp, &lpszStr[pszStart - lpszStr], nCopyLen);
cp += nCopyLen;
@@ -472,7 +472,7 @@ HRESULT TestMarkupServices(BSTR bstrHtml, MarkupCallback *pCallback, BSTR &messa
HRESULT hr = pHtmlDocRoot->QueryInterface(IID_PPV_ARGS(&pPersistStreamInit));
if (SUCCEEDED(hr)) {
// Initialize the root document to a default state -- ready for parsing.
- hr = pPersistStreamInit->InitNew();
+ pPersistStreamInit->InitNew();
IMarkupServices *pMarkupServices = NULL;
hr = pHtmlDocRoot->QueryInterface(IID_PPV_ARGS(&pMarkupServices));