Mercurial > dwindows
changeset 2058:f8865a4b5835
Win: Fix warnings when compiling with mingw32 gcc 5.1.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 31 Dec 2019 23:35:59 +0000 |
parents | 9c400365f269 |
children | c1afe013b07c |
files | win/browser.c win/dw.c |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/win/browser.c Sat Dec 14 15:08:18 2019 +0000 +++ b/win/browser.c Tue Dec 31 23:35:59 2019 +0000 @@ -1170,7 +1170,7 @@ /* Get the window handle and URL */ vWindow.vt = VT_UI8; pwb->lpVtbl->GetProperty(pwb, bstrProp, &vWindow); - hwnd = (HWND)vWindow.ullVal; + hwnd = (HWND)DW_UINT_TO_POINTER(vWindow.ullVal); SysFreeString(bstrProp); /* Send the event for signal handling */ _wndproc(hwnd, WM_USER+101, (WPARAM)DW_INT_TO_POINTER(DW_HTML_CHANGE_STARTED), (LPARAM)WideToUTF8((LPWSTR)pszURL)); @@ -1190,7 +1190,7 @@ /* Get the window handle and URL */ vWindow.vt = VT_UI8; pwb->lpVtbl->GetProperty(pwb, bstrProp, &vWindow); - hwnd = (HWND)vWindow.ullVal; + hwnd = (HWND)DW_UINT_TO_POINTER(vWindow.ullVal); SysFreeString(bstrProp); pwb->lpVtbl->get_LocationURL(pwb, &locationURL); /* Send the event for signal handling */ @@ -1858,7 +1858,7 @@ // Save the window handle as a property for later use VariantInit(&vWindow); vWindow.vt = VT_UI8; - vWindow.ullVal = (ULONGLONG)hwnd; + vWindow.ullVal = (ULONGLONG)DW_POINTER_TO_UINT(hwnd); bstrProp = SysAllocString(L"DWindow"); webBrowser2->lpVtbl->PutProperty(webBrowser2, bstrProp, vWindow); SysFreeString(bstrProp); @@ -1866,7 +1866,7 @@ // Get IWebBrowser2' IConnectionPointContainer sub-object. We do this by calling // IWebBrowser2' QueryInterface, and pass it the standard GUID for an // IConnectionPointContainer VTable - if (!(hr = webBrowser2->lpVtbl->QueryInterface(webBrowser2, &IID_IConnectionPointContainer, &container))) + if (!(hr = webBrowser2->lpVtbl->QueryInterface(webBrowser2, &IID_IConnectionPointContainer, (void **)&container))) { // Get IWebBrowser2' IConnectionPoint sub-object for specifically giving // IWebBRowser2 our DWEventHandler. We do this by calling IConnectionPointContainer's
--- a/win/dw.c Sat Dec 14 15:08:18 2019 +0000 +++ b/win/dw.c Tue Dec 31 23:35:59 2019 +0000 @@ -5274,7 +5274,7 @@ oldfont = cinfo->hfont; cinfo->hfont = hfont; } - else if(cinfo = calloc(1, sizeof(ColorInfo))) + else if((cinfo = calloc(1, sizeof(ColorInfo)))) { cinfo->fore = cinfo->back = -1; @@ -5445,7 +5445,7 @@ cinfo->fore = fore; cinfo->back = back; } - else if(cinfo = calloc(1, sizeof(ColorInfo))) + else if((cinfo = calloc(1, sizeof(ColorInfo)))) { cinfo->fore = fore; cinfo->back = back;