From: Michael Stefaniuc mstefani@winehq.org
--- dlls/ws2_32/tests/afd.c | 18 +++++++++--------- dlls/ws2_32/tests/sock.c | 7 +------ 2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/dlls/ws2_32/tests/afd.c b/dlls/ws2_32/tests/afd.c index d0191ba8dbf..1644a9dc4ff 100644 --- a/dlls/ws2_32/tests/afd.c +++ b/dlls/ws2_32/tests/afd.c @@ -1429,7 +1429,7 @@ static void test_recv(void) ret = listen(listener, 1); ok(!ret, "got error %u\n", WSAGetLastError()); len = sizeof(addr); - ret = getsockname(listener, (struct sockaddr *)&addr, &len); + ret = getsockname(listener, &addr, &len); ok(!ret, "got error %u\n", WSAGetLastError());
memset(&io, 0, sizeof(io)); @@ -1439,7 +1439,7 @@ static void test_recv(void) ok(!io.Information, "got information %#Ix\n", io.Information);
client = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - ret = connect(client, (struct sockaddr *)&addr, sizeof(addr)); + ret = connect(client, &addr, sizeof(addr)); ok(!ret, "got error %u\n", WSAGetLastError()); server = accept(listener, NULL, NULL); ok(server != -1, "got error %u\n", WSAGetLastError()); @@ -1717,7 +1717,7 @@ static void test_recv(void) ret = bind(client, (const struct sockaddr *)&bind_addr, sizeof(bind_addr)); ok(!ret, "got error %u\n", WSAGetLastError()); len = sizeof(addr); - ret = getsockname(client, (struct sockaddr *)&addr, &len); + ret = getsockname(client, &addr, &len); ok(!ret, "got error %u\n", WSAGetLastError());
memset(buffer, 0xcc, sizeof(buffer)); @@ -1725,7 +1725,7 @@ static void test_recv(void) IOCTL_AFD_RECV, ¶ms, sizeof(params), NULL, 0); ok(ret == STATUS_PENDING, "got %#x\n", ret);
- ret = sendto(server, "data", 5, 0, (struct sockaddr *)&addr, sizeof(addr)); + ret = sendto(server, "data", 5, 0, &addr, sizeof(addr)); ok(ret == 5, "got %d\n", ret);
ret = WaitForSingleObject(event, 200); @@ -1741,7 +1741,7 @@ static void test_recv(void) IOCTL_AFD_RECV, ¶ms, sizeof(params), NULL, 0); ok(ret == STATUS_PENDING, "got %#x\n", ret);
- ret = sendto(server, "moredata", 9, 0, (struct sockaddr *)&addr, sizeof(addr)); + ret = sendto(server, "moredata", 9, 0, &addr, sizeof(addr)); ok(ret == 9, "got %d\n", ret);
ret = WaitForSingleObject(event, 200); @@ -1750,7 +1750,7 @@ static void test_recv(void) ok(io.Information == 6, "got %#Ix\n", io.Information); ok(!memcmp(buffer, "mo\xccreda\xcc", 7), "got %s\n", debugstr_an(buffer, io.Information));
- ret = sendto(server, "moredata", 9, 0, (struct sockaddr *)&addr, sizeof(addr)); + ret = sendto(server, "moredata", 9, 0, &addr, sizeof(addr)); ok(ret == 9, "got %d\n", ret);
/* wait for the data to be available */ @@ -2352,7 +2352,7 @@ static void test_getsockname(void) ok(!io.Status, "got %#lx\n", io.Status); ok(io.Information == sizeof(addr), "got %#Ix\n", io.Information); len = sizeof(addr2); - ret = getsockname(client, (struct sockaddr *)&addr2, &len); + ret = getsockname(client, &addr2, &len); ok(!ret, "got error %u\n", WSAGetLastError()); ok(!memcmp(&addr, &addr2, sizeof(struct sockaddr)), "addresses didn't match\n");
@@ -2364,7 +2364,7 @@ static void test_getsockname(void) ok(!io.Status, "got %#lx\n", io.Status); ok(io.Information == sizeof(addr), "got %#Ix\n", io.Information); len = sizeof(addr2); - ret = getsockname(server, (struct sockaddr *)&addr2, &len); + ret = getsockname(server, &addr2, &len); ok(!ret, "got error %u\n", WSAGetLastError()); ok(!memcmp(&addr, &addr2, sizeof(struct sockaddr)), "addresses didn't match\n");
@@ -2392,7 +2392,7 @@ static void test_getsockname(void) ok(!io.Status, "got %#lx\n", io.Status); ok(io.Information == sizeof(addr), "got %#Ix\n", io.Information); len = sizeof(addr2); - ret = getsockname(client, (struct sockaddr *)&addr2, &len); + ret = getsockname(client, &addr2, &len); ok(!ret, "got error %u\n", WSAGetLastError()); ok(!memcmp(&addr, &addr2, sizeof(struct sockaddr)), "addresses didn't match\n");
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index cddc4c125ff..17d5f3993e5 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -836,12 +836,7 @@ static VOID WINAPI simple_mixed_client ( client_params *par ) ((struct sockaddr_in*)&test)->sin_addr.s_addr = inet_addr("0.0.0.0");
/* Receive data echoed back & check it */ - n_recvd = do_synchronous_recvfrom ( mem->s, - mem->recv_buf, - n_expected, - 0, - (struct sockaddr *)&test, - &fromLen, + n_recvd = do_synchronous_recvfrom ( mem->s, mem->recv_buf, n_expected, 0, &test, &fromLen, par->buflen ); ok ( n_recvd == n_expected, "simple_client (%x): received less data than expected: %d of %d\n", id, n_recvd, n_expected );
From: Michael Stefaniuc mstefani@winehq.org
--- dlls/wmvcore/async_reader.c | 2 +- dlls/wmvcore/tests/wmvcore.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/wmvcore/async_reader.c b/dlls/wmvcore/async_reader.c index 47de592c95c..95f617b5cf8 100644 --- a/dlls/wmvcore/async_reader.c +++ b/dlls/wmvcore/async_reader.c @@ -1932,7 +1932,7 @@ static HRESULT WINAPI async_reader_create(IWMReader **reader) list_init(&object->async_ops);
TRACE("Created async reader %p.\n", object); - *reader = (IWMReader *)&object->IWMReader_iface; + *reader = &object->IWMReader_iface; return S_OK;
failed: diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c index 9f755859481..6071ac25ad7 100644 --- a/dlls/wmvcore/tests/wmvcore.c +++ b/dlls/wmvcore/tests/wmvcore.c @@ -1920,7 +1920,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta callback->callback_tid = GetCurrentThreadId(); ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type); ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value); - ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context); ret = WaitForSingleObject(callback->expect_started, 100); ok(!ret, "Wait timed out.\n"); callback->end_of_streaming_count = callback->eof_count = callback->sample_count = 0; @@ -1933,7 +1933,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta ok(callback->callback_tid == GetCurrentThreadId(), "got wrong thread\n"); ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type); ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value); - ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context); ret = WaitForSingleObject(callback->expect_stopped, 100); ok(!ret, "Wait timed out.\n"); SetEvent(callback->got_stopped); @@ -1942,7 +1942,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta case WMT_CLOSED: ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type); ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value); - ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context); ++callback->closed_count; break;
@@ -1950,7 +1950,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta ok(callback->callback_tid == GetCurrentThreadId(), "got wrong thread\n"); ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type); ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value); - ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context); ++callback->end_of_streaming_count; break;
@@ -1958,7 +1958,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta ok(callback->callback_tid == GetCurrentThreadId(), "got wrong thread\n"); ok(type == WMT_TYPE_DWORD, "Got type %#x.\n", type); ok(!*(DWORD *)value, "Got value %#lx.\n", *(DWORD *)value); - ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context); if (callback->all_streams_off) ok(callback->sample_count == 0, "Got %u samples.\n", callback->sample_count); else @@ -1976,7 +1976,7 @@ static HRESULT WINAPI callback_OnStatus(IWMReaderCallback *iface, WMT_STATUS sta ok(callback->callback_tid == GetCurrentThreadId(), "got wrong thread\n"); ok(type == WMT_TYPE_QWORD, "Got type %#x.\n", type); ok(*(QWORD *)value == 3000, "Got value %#lx.\n", *(DWORD *)value); - ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context); if (callback->all_streams_off) ok(callback->sample_count == 0, "Got %u samples.\n", callback->sample_count); else @@ -2082,7 +2082,7 @@ static HRESULT WINAPI callback_OnSample(IWMReaderCallback *iface, DWORD output, if (stream) ok(stream->input_tid != GetCurrentThreadId(), "got wrong thread\n");
- ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context);
check_async_sample(callback, sample);
@@ -2166,7 +2166,7 @@ static HRESULT WINAPI callback_advanced_OnStreamSample(IWMReaderCallbackAdvanced if (stream) ok(stream->input_tid != GetCurrentThreadId(), "got wrong thread\n");
- ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context);
check_async_sample(callback, sample);
@@ -2191,7 +2191,7 @@ static HRESULT WINAPI callback_advanced_OnTime(IWMReaderCallbackAdvanced *iface,
todo_wine_if(time % 10000) ok(time == callback->expect_time, "Got time %I64u.\n", time); - ok(context == (void *)callback->expect_context, "Got unexpected context %p.\n", context); + ok(context == callback->expect_context, "Got unexpected context %p.\n", context); ret = WaitForSingleObject(callback->expect_ontime, 100); ok(!ret, "Wait timed out.\n"); SetEvent(callback->got_ontime);
From: Michael Stefaniuc mstefani@winehq.org
--- dlls/dbghelp/dwarf.c | 2 +- dlls/dbghelp/msc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 1402ffcb941..99ef80fb6a2 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -2141,7 +2141,7 @@ static void dwarf2_parse_inlined_subroutine(dwarf2_subprogram_t* subpgm, subpgm->current_block ? &subpgm->current_block->symt : &subpgm->current_func->symt, dwarf2_get_cpp_name(di, name.u.string), &sig_type->symt, num_ranges); - subpgm->current_func = (struct symt_function*)inlined; + subpgm->current_func = inlined; subpgm->current_block = NULL;
if (!dwarf2_fill_ranges(di, inlined->ranges, num_ranges)) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 56a47ab7dac..c6dca22883a 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2683,7 +2683,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, (const unsigned char*)sym + length); if (inlined) { - curr_func = (struct symt_function*)inlined; + curr_func = inlined; block = NULL; } else @@ -2704,7 +2704,7 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, (const unsigned char*)sym + length); if (inlined) { - curr_func = (struct symt_function*)inlined; + curr_func = inlined; block = NULL; } else
The two ws2_32/afd test failures are pre-existing: https://test.winehq.org/data/f266dc094a9b4fbe95792ed706891609901834e3/linux_... https://test.winehq.org/data/4d610717bbc21d65e41a29f9fe9ab5f2963cf16d/linux_... I can reproduce those failures with or without my patch.
Also the patch is a no-op: exact same object files are generated with "CFLAGS=-O2 -g0 -DNDEBUG -DWINETEST_NO_LINE_NUMBERS". Without the whitespace aka line changes it is a true no-op aka same object files are being generated with the default compile flags.
This merge request was approved by Zebediah Figura.