From 6efbf2e5b507213f0963dacc631d82edce337ff8 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 16 Mar 2022 12:03:11 +1100 Subject: [PATCH] Updated msxml3-FreeThreadedXMLHTTP60 patchset Warning fixes. --- ...xml3-Implement-FreeThreadedXMLHTTP60.patch | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/patches/msxml3-FreeThreadedXMLHTTP60/0003-msxml3-Implement-FreeThreadedXMLHTTP60.patch b/patches/msxml3-FreeThreadedXMLHTTP60/0003-msxml3-Implement-FreeThreadedXMLHTTP60.patch index 0b4889e2..387e49ab 100644 --- a/patches/msxml3-FreeThreadedXMLHTTP60/0003-msxml3-Implement-FreeThreadedXMLHTTP60.patch +++ b/patches/msxml3-FreeThreadedXMLHTTP60/0003-msxml3-Implement-FreeThreadedXMLHTTP60.patch @@ -1,4 +1,4 @@ -From 84c611b7d9345b2b1ea551df24be0c093b11ccb7 Mon Sep 17 00:00:00 2001 +From 754cda08319f931f20d07f5197aa5840a6bee0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Tue, 8 Sep 2020 18:43:52 +0200 Subject: [PATCH] msxml3: Implement FreeThreadedXMLHTTP60. @@ -49,7 +49,7 @@ index 243ee379712..323c7b49848 100644 IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP30 ) || IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP40 ) || diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c -index cc384a380e5..70855d5c6ee 100644 +index cc384a380e5..9f89b5cb8fb 100644 --- a/dlls/msxml3/httprequest.c +++ b/dlls/msxml3/httprequest.c @@ -38,10 +38,12 @@ @@ -124,7 +124,7 @@ index cc384a380e5..70855d5c6ee 100644 +{ + struct xml_http_request_2 *This = impl_from_IXMLHTTPRequest3(iface); + ULONG ref = InterlockedIncrement(&This->req.ref); -+ TRACE("(%p)->(%u)\n", This, ref); ++ TRACE("(%p)->(%lu)\n", This, ref); + return ref; +} + @@ -133,7 +133,7 @@ index cc384a380e5..70855d5c6ee 100644 + struct xml_http_request_2 *This = impl_from_IXMLHTTPRequest3(iface); + ULONG ref = InterlockedDecrement(&This->req.ref); + -+ TRACE("(%p)->(%u)\n", This, ref); ++ TRACE("(%p)->(%lu)\n", This, ref); + + if (ref == 0) + { @@ -264,7 +264,7 @@ index cc384a380e5..70855d5c6ee 100644 + ULONG *cookies_count, XHR_COOKIE **cookies) +{ + struct xml_http_request_2 *This = impl_from_IXMLHTTPRequest3(iface); -+ FIXME("(%p)->(%s %s %d %p %p) stub!\n", This, debugstr_w(url), debugstr_w(name), flags, cookies_count, cookies); ++ FIXME("(%p)->(%s %s %ld %p %p) stub!\n", This, debugstr_w(url), debugstr_w(name), flags, cookies_count, cookies); + return E_NOTIMPL; +} + @@ -293,7 +293,7 @@ index cc384a380e5..70855d5c6ee 100644 +static HRESULT WINAPI xml_http_request_3_SetClientCertificate(IXMLHTTPRequest3 *iface, DWORD count, const BYTE *hashes, const WCHAR *pin) +{ + struct xml_http_request_2 *This = impl_from_IXMLHTTPRequest3(iface); -+ FIXME("(%p)->(%d %p %s) stub!\n", This, count, hashes, debugstr_w(pin)); ++ FIXME("(%p)->(%ld %p %s) stub!\n", This, count, hashes, debugstr_w(pin)); + return E_NOTIMPL; +} + @@ -380,7 +380,7 @@ index cc384a380e5..70855d5c6ee 100644 + if (FAILED(hr = ISequentialStream_Read(This->request_body, V_BSTR(&body_v), This->request_body_size, &read)) || + read < This->request_body_size) + { -+ ERR("Failed to allocate request body memory, hr %#x\n", hr); ++ ERR("Failed to allocate request body memory, hr %#lx\n", hr); + CoTaskMemFree(V_BSTR(&body_v)); + goto done; + } @@ -448,7 +448,7 @@ index cc384a380e5..70855d5c6ee 100644 + LCID lcid, ITypeInfo **value) +{ + struct xml_http_request_2 *This = xml_http_request_2_from_IDispatch(iface); -+ FIXME("(%p)->(%d %u %p) stub!\n", This, index, lcid, value); ++ FIXME("(%p)->(%d %lu %p) stub!\n", This, index, lcid, value); + *value = NULL; + return S_OK; +} @@ -458,7 +458,7 @@ index cc384a380e5..70855d5c6ee 100644 + LCID lcid, DISPID *disp_ids) +{ + struct xml_http_request_2 *This = xml_http_request_2_from_IDispatch(iface); -+ FIXME("(%p)->(%s %p %d %u %p) stub!\n", This, debugstr_guid(riid), names, names_count, lcid, disp_ids); ++ FIXME("(%p)->(%s %p %d %lu %p) stub!\n", This, debugstr_guid(riid), names, names_count, lcid, disp_ids); + return S_OK; +} + @@ -472,7 +472,7 @@ index cc384a380e5..70855d5c6ee 100644 + LONG status; + BSTR status_str = NULL; + -+ TRACE("(%p)->(%d %s %u %d %p %p %p %p) stub!\n", This, id, debugstr_guid(riid), lcid, flags, ++ TRACE("(%p)->(%ld %s %lu %d %p %p %p %p) stub!\n", This, id, debugstr_guid(riid), lcid, flags, + params, result, exception, arg_err); + + if (This->req.state == READYSTATE_COMPLETE) @@ -491,7 +491,7 @@ index cc384a380e5..70855d5c6ee 100644 + if (FAILED(hr = httprequest_get_status(&This->req, &status)) || + FAILED(hr = httprequest_get_statusText(&This->req, &status_str))) + { -+ WARN("failed to get response status, error %#x\n", hr); ++ WARN("failed to get response status, error %#lx\n", hr); + IXMLHTTPRequest2Callback_OnError(This->callback, xhr2_iface, hr); + IXMLHTTPRequest2Callback_Release(This->callback); + return S_OK; @@ -506,7 +506,7 @@ index cc384a380e5..70855d5c6ee 100644 + if (FAILED(hr = httprequest_get_responseStream(&This->req, &body_v)) || + FAILED(hr = IUnknown_QueryInterface(V_UNKNOWN(&body_v), &IID_ISequentialStream, (void **)&This->response_body))) + { -+ WARN("failed to get response stream, error %#x\n", hr); ++ WARN("failed to get response stream, error %#lx\n", hr); + IXMLHTTPRequest2Callback_OnError(This->callback, xhr2_iface, hr); + IXMLHTTPRequest2Callback_Release(This->callback); + return S_OK; @@ -589,7 +589,7 @@ index 8003c1a9650..59b8c29845d 100644 extern HRESULT XSLTemplate_create(void**) DECLSPEC_HIDDEN; extern HRESULT MXWriter_create(MSXML_VERSION, void**) DECLSPEC_HIDDEN; diff --git a/dlls/msxml3/tests/httpreq.c b/dlls/msxml3/tests/httpreq.c -index 2491e499638..511c2b26763 100644 +index bf52e71a6e7..285ef527f05 100644 --- a/dlls/msxml3/tests/httpreq.c +++ b/dlls/msxml3/tests/httpreq.c @@ -26,9 +26,9 @@ @@ -604,7 +604,7 @@ index 2491e499638..511c2b26763 100644 #include "dispex.h" #include "initguid.h" -@@ -1348,6 +1348,17 @@ static IXMLHttpRequest *create_xhr(void) +@@ -1345,6 +1345,17 @@ static IXMLHttpRequest *create_xhr(void) return SUCCEEDED(hr) ? ret : NULL; } @@ -622,7 +622,7 @@ index 2491e499638..511c2b26763 100644 static IServerXMLHTTPRequest *create_server_xhr(void) { IServerXMLHTTPRequest *ret; -@@ -1908,11 +1919,388 @@ static void test_supporterrorinfo(void) +@@ -1905,11 +1916,388 @@ static void test_supporterrorinfo(void) IServerXMLHTTPRequest_Release(server_xhr); } @@ -658,7 +658,7 @@ index 2491e499638..511c2b26763 100644 +{ + struct xhr3_callback *This = xhr3_callback_from_IXMLHTTPRequest3Callback(iface); + ULONG ref = InterlockedIncrement(&This->ref); -+ trace("(%p)->(%u)\n", This, ref); ++ trace("(%p)->(%lu)\n", This, ref); + return ref; +} + @@ -666,7 +666,7 @@ index 2491e499638..511c2b26763 100644 +{ + struct xhr3_callback *This = xhr3_callback_from_IXMLHTTPRequest3Callback(iface); + ULONG ref = InterlockedDecrement(&This->ref); -+ trace("(%p)->(%u)\n", This, ref); ++ trace("(%p)->(%lu)\n", This, ref); + if (ref == 0) HeapFree(GetProcessHeap(), 0, This); + return ref; +} @@ -686,11 +686,11 @@ index 2491e499638..511c2b26763 100644 + WCHAR *header = NULL; + HRESULT hr; + -+ trace("(%p)->(%p %d %s)\n", This, request, status, debugstr_w(status_str)); ++ trace("(%p)->(%p %lu %s)\n", This, request, status, debugstr_w(status_str)); + + header = (void *)0xdeadbeef; + hr = IXMLHTTPRequest2_GetResponseHeader(request, L"Content-Length", &header); -+ trace("Content-Length: %p (%s), hr %#x\n", header, debugstr_w(header), hr); ++ trace("Content-Length: %p (%s), hr %#lx\n", header, debugstr_w(header), hr); + + return S_OK; +} @@ -719,23 +719,23 @@ index 2491e499638..511c2b26763 100644 + + header = (void *)0xdeadbeef; + hr = IXMLHTTPRequest2_GetResponseHeader(request, L"Cache-Control", &header); -+ trace("Cache-Control: %p (%s), hr %#x\n", header, debugstr_w(header), hr); ++ trace("Cache-Control: %p (%s), hr %#lx\n", header, debugstr_w(header), hr); + + header = (void *)0xdeadbeef; + hr = IXMLHTTPRequest2_GetResponseHeader(request, L"Expires", &header); -+ trace("Expires: %p (%s), hr %#x\n", header, debugstr_w(header), hr); ++ trace("Expires: %p (%s), hr %#lx\n", header, debugstr_w(header), hr); + + header = (void *)0xdeadbeef; + hr = IXMLHTTPRequest2_GetResponseHeader(request, L"Content-Type", &header); -+ trace("Content-Type: %p (%s), hr %#x\n", header, debugstr_w(header), hr); ++ trace("Content-Type: %p (%s), hr %#lx\n", header, debugstr_w(header), hr); + + read_size = 0xdeadbeef; + hr = ISequentialStream_Read(response, buffer, 214, &read_size); -+ trace("Response: (%d) %s, hr %#x\n", read_size, debugstr_a(buffer), hr); ++ trace("Response: (%ld) %s, hr %#lx\n", read_size, debugstr_a(buffer), hr); + + read_size = 0xdeadbeef; + hr = ISequentialStream_Read(response, buffer, 1, &read_size); -+ trace("Response: (%d) %s, hr %#x\n", read_size, debugstr_a(buffer), hr); ++ trace("Response: (%ld) %s, hr %#lx\n", read_size, debugstr_a(buffer), hr); + + HeapFree( GetProcessHeap(), 0, buffer ); + SetEvent(This->event); @@ -747,7 +747,7 @@ index 2491e499638..511c2b26763 100644 + IXMLHTTPRequest2 *request, HRESULT error) +{ + struct xhr3_callback *This = xhr3_callback_from_IXMLHTTPRequest3Callback(iface); -+ trace("(%p)->(%p %#x)\n", This, request, error); ++ trace("(%p)->(%p %#lx)\n", This, request, error); + SetEvent(This->event); + return S_OK; +} @@ -756,7 +756,7 @@ index 2491e499638..511c2b26763 100644 + IXMLHTTPRequest3 *request, DWORD errors, DWORD chain_size, const XHR_CERT *chain) +{ + struct xhr3_callback *This = xhr3_callback_from_IXMLHTTPRequest3Callback(iface); -+ trace("(%p)->(%p %u %u %p)\n", This, request, errors, chain_size, chain); ++ trace("(%p)->(%p %lu %lu %p)\n", This, request, errors, chain_size, chain); + return S_OK; +} + @@ -764,7 +764,7 @@ index 2491e499638..511c2b26763 100644 + IXMLHTTPRequest3 *request, DWORD issuers_size, const WCHAR **issuers) +{ + struct xhr3_callback *This = xhr3_callback_from_IXMLHTTPRequest3Callback(iface); -+ trace("(%p)->(%p %u %p)\n", This, request, issuers_size, issuers); ++ trace("(%p)->(%p %lu %p)\n", This, request, issuers_size, issuers); + return S_OK; +} + @@ -829,7 +829,7 @@ index 2491e499638..511c2b26763 100644 +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); + ULONG ref = InterlockedIncrement(&This->ref); -+ trace("(%p)->(%u)\n", This, ref); ++ trace("(%p)->(%lu)\n", This, ref); + return ref; +} + @@ -837,7 +837,7 @@ index 2491e499638..511c2b26763 100644 +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); + ULONG ref = InterlockedDecrement(&This->ref); -+ trace("(%p)->(%u)\n", This, ref); ++ trace("(%p)->(%lu)\n", This, ref); + if (ref == 0) + { + IStream_Release(This->stream); @@ -850,7 +850,7 @@ index 2491e499638..511c2b26763 100644 + ULONG *pcbRead) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%p %u %p)\n", This, pv, cb, pcbRead); ++ trace("(%p)->(%p %lu %p)\n", This, pv, cb, pcbRead); + return IStream_Read(This->stream, pv, cb, pcbRead); +} + @@ -858,7 +858,7 @@ index 2491e499638..511c2b26763 100644 + ULONG cb, ULONG *pcbWritten) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%p %u %p)\n", This, pv, cb, pcbWritten); ++ trace("(%p)->(%p %lu %p)\n", This, pv, cb, pcbWritten); + return IStream_Write(This->stream, pv, cb, pcbWritten); +} + @@ -866,14 +866,14 @@ index 2491e499638..511c2b26763 100644 + DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%lu, %u %p)\n", This, dlibMove.QuadPart, dwOrigin, plibNewPosition); ++ trace("(%p)->(%I64u, %lu %p)\n", This, dlibMove.QuadPart, dwOrigin, plibNewPosition); + return IStream_Seek(This->stream, dlibMove, dwOrigin, plibNewPosition); +} + +static HRESULT WINAPI xhr2_stream_SetSize(IStream *iface, ULARGE_INTEGER libNewSize) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%lu)\n", This, libNewSize.QuadPart); ++ trace("(%p)->(%I64u)\n", This, libNewSize.QuadPart); + return IStream_SetSize(This->stream, libNewSize); +} + @@ -881,14 +881,14 @@ index 2491e499638..511c2b26763 100644 + ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%p %lu %p %p)\n", This, pstm, cb.QuadPart, pcbRead, pcbWritten); ++ trace("(%p)->(%p %I64u %p %p)\n", This, pstm, cb.QuadPart, pcbRead, pcbWritten); + return IStream_CopyTo(This->stream, pstm, cb, pcbRead, pcbWritten); +} + +static HRESULT WINAPI xhr2_stream_Commit(IStream *iface, DWORD grfCommitFlags) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%#x)\n", This, grfCommitFlags); ++ trace("(%p)->(%#lx)\n", This, grfCommitFlags); + return IStream_Commit(This->stream, grfCommitFlags); +} + @@ -903,7 +903,7 @@ index 2491e499638..511c2b26763 100644 + ULARGE_INTEGER cb, DWORD dwLockType) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%lu %lu %u)\n", This, libOffset.QuadPart, cb.QuadPart, dwLockType); ++ trace("(%p)->(%I64u %I64u %lu)\n", This, libOffset.QuadPart, cb.QuadPart, dwLockType); + return IStream_LockRegion(This->stream, libOffset, cb, dwLockType); +} + @@ -911,14 +911,14 @@ index 2491e499638..511c2b26763 100644 + ULARGE_INTEGER cb, DWORD dwLockType) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%lu %lu %u)\n", This, libOffset.QuadPart, cb.QuadPart, dwLockType); ++ trace("(%p)->(%I64u %I64u %lu)\n", This, libOffset.QuadPart, cb.QuadPart, dwLockType); + return IStream_UnlockRegion(This->stream, libOffset, cb, dwLockType); +} + +static HRESULT WINAPI xhr2_stream_Stat(IStream *iface, STATSTG *pstatstg, DWORD grfStatFlag) +{ + struct xhr2_stream *This = xhr2_stream_from_IStream(iface); -+ trace("(%p)->(%p %#x)\n", This, pstatstg, grfStatFlag); ++ trace("(%p)->(%p %#lx)\n", This, pstatstg, grfStatFlag); + return IStream_Stat(This->stream, pstatstg, grfStatFlag); +} + @@ -980,15 +980,15 @@ index 2491e499638..511c2b26763 100644 + if (!(xhr3_callback = xhr3_callback_create(events[i]))) + return; + -+ trace("IXMLHTTPRequest2_Open (%p)->(L\"GET\", L\"http://test.winehq.org/\", xhr3_callback, NULL, NULL, NULL, NULL)\n", GetCurrentThreadId(), xhr2[i]); ++ trace("%lu: IXMLHTTPRequest2_Open (%p)->(L\"GET\", L\"http://test.winehq.org/\", xhr3_callback, NULL, NULL, NULL, NULL)\n", GetCurrentThreadId(), xhr2[i]); + hr = IXMLHTTPRequest2_Open(xhr2[i], L"GET", L"http://test.winehq.org/", xhr3_callback, NULL, NULL, NULL, NULL); -+ ok(SUCCEEDED(hr), "IXMLHTTPRequest2_Send failed %#x\n", hr); ++ ok(SUCCEEDED(hr), "IXMLHTTPRequest2_Send failed %#lx\n", hr); + + if ((stream = xhr2_stream_create())) + { -+ trace("IXMLHTTPRequest2_Send (%p)->(%p 0)\n", GetCurrentThreadId(), xhr2[i], stream); ++ trace("%lu: IXMLHTTPRequest2_Send (%p)->(%p 0)\n", GetCurrentThreadId(), xhr2[i], stream); + hr = IXMLHTTPRequest2_Send(xhr2[i], stream, 0); -+ ok(SUCCEEDED(hr), "IXMLHTTPRequest2_Send failed %#x\n", hr); ++ ok(SUCCEEDED(hr), "IXMLHTTPRequest2_Send failed %#lx\n", hr); + + ISequentialStream_Release(stream); + } @@ -1012,7 +1012,7 @@ index 2491e499638..511c2b26763 100644 if (!(xhr = create_xhr())) { -@@ -1927,6 +2315,7 @@ START_TEST(httpreq) +@@ -1924,6 +2312,7 @@ START_TEST(httpreq) test_server_xhr(); test_safe_httpreq(); test_supporterrorinfo(); @@ -1021,7 +1021,7 @@ index 2491e499638..511c2b26763 100644 CoUninitialize(); } diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c -index 219d7144ddb..7ef033237a1 100644 +index fd7abca151d..f518068acb6 100644 --- a/dlls/msxml3/tests/schema.c +++ b/dlls/msxml3/tests/schema.c @@ -32,10 +32,16 @@ @@ -1065,5 +1065,5 @@ index 333d4f3d3c7..1b4f0452c5f 100644 /* * Note that because of a #define in msxml2.h, we end up initializing -- -2.34.1 +2.35.1