Commit 708d13b0 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32/tests: Use nameless unions/structs.

parent 3069b98b
......@@ -507,8 +507,8 @@ static void test_readdirectorychanges(void)
SetEvent(ov.hEvent);
ov.Internal = 1;
ov.InternalHigh = 1;
S(U(ov)).Offset = 0;
S(U(ov)).OffsetHigh = 0;
ov.Offset = 0;
ov.OffsetHigh = 0;
memset( buffer, 0, sizeof buffer );
r = ReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,filter,NULL,&ov,NULL);
ok(r==TRUE, "should return true\n");
......@@ -692,8 +692,8 @@ static void test_readdirectorychanges_null(void)
ov.Internal = 0;
ov.InternalHigh = 0;
S(U(ov)).Offset = 0;
S(U(ov)).OffsetHigh = 0;
ov.Offset = 0;
ov.OffsetHigh = 0;
memset( buffer, 0, sizeof buffer );
r = ReadDirectoryChangesW(hdir,buffer,sizeof buffer,FALSE,filter,NULL,&ov,NULL);
......
......@@ -831,8 +831,8 @@ static void test_waittxempty(void)
ok(!res, "WriteFile on an overlapped handle without ovl structure should fail\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
S(U(ovl_write)).Offset = 0;
S(U(ovl_write)).OffsetHigh = 0;
ovl_write.Offset = 0;
ovl_write.OffsetHigh = 0;
ovl_write.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
before = GetTickCount();
SetLastError(0xdeadbeef);
......@@ -845,8 +845,8 @@ static void test_waittxempty(void)
after - before, bytes, baud);
/* don't wait for WriteFile completion */
S(U(ovl_wait)).Offset = 0;
S(U(ovl_wait)).OffsetHigh = 0;
ovl_wait.Offset = 0;
ovl_wait.OffsetHigh = 0;
ovl_wait.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
evtmask = 0;
before = GetTickCount();
......@@ -904,8 +904,8 @@ static void test_waittxempty(void)
if (i == 0)
{
S(U(ovl_write)).Offset = 0;
S(U(ovl_write)).OffsetHigh = 0;
ovl_write.Offset = 0;
ovl_write.OffsetHigh = 0;
ovl_write.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
SetLastError(0xdeadbeef);
res = WriteFile(hcom, tbuf, sizeof(tbuf), &bytes, &ovl_write);
......@@ -932,8 +932,8 @@ static void test_waittxempty(void)
ok(stat.cbOutQue == 0, "OutQueue should be empty, got %ld bytes\n", stat.cbOutQue);
ok(errors == 0, "ClearCommErrors: Unexpected error 0x%08lx\n", errors);
S(U(ovl_wait)).Offset = 0;
S(U(ovl_wait)).OffsetHigh = 0;
ovl_wait.Offset = 0;
ovl_wait.OffsetHigh = 0;
ovl_wait.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
evtmask = 0;
SetLastError(0xdeadbeef);
......@@ -958,8 +958,8 @@ static void test_waittxempty(void)
{
ok(!evtmask, "WaitCommEvent: expected 0, got %#lx\n", evtmask);
S(U(ovl_wait2)).Offset = 0;
S(U(ovl_wait2)).OffsetHigh = 0;
ovl_wait2.Offset = 0;
ovl_wait2.OffsetHigh = 0;
ovl_wait2.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
SetLastError(0xdeadbeef);
res = WaitCommEvent(hcom, &evtmask, &ovl_wait2);
......@@ -1949,8 +1949,8 @@ static void test_WaitCommEvent(void)
ret = SetCommMask(hcom, 0x1fff);
ok(ret, "SetCommMask error %ld\n", GetLastError());
S(U(ovl_wait)).Offset = 0;
S(U(ovl_wait)).OffsetHigh = 0;
ovl_wait.Offset = 0;
ovl_wait.OffsetHigh = 0;
ovl_wait.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
trace("waiting 10 secs for com port events (turn on/off the device)...\n");
......@@ -2062,34 +2062,34 @@ static void test_read_write(void)
ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(bytes == 0, "bytes %lu\n", bytes);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtWriteFile(hcom, 0, NULL, NULL, &iob, atz, 0, NULL, NULL);
ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
for (i = -20; i < 20; i++)
{
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)i;
status = pNtWriteFile(hcom, 0, NULL, NULL, &iob, atz, 0, &offset, NULL);
if (i >= 0 || i == -1)
{
ok(status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, status);
ok(U(iob).Status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, iob.Status);
ok(iob.Information == 0, "%ld: expected 0, got %Iu\n", i, iob.Information);
}
else
{
ok(status == STATUS_INVALID_PARAMETER, "%ld: expected STATUS_INVALID_PARAMETER, got %#lx\n", i, status);
ok(U(iob).Status == -1, "%ld: expected -1, got %#lx\n", i, U(iob).Status);
ok(iob.Status == -1, "%ld: expected -1, got %#lx\n", i, iob.Status);
ok(iob.Information == -1, "%ld: expected -1, got %Id\n", i, iob.Information);
}
}
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtWriteFile(hcom, 0, NULL, NULL, &iob, atz, sizeof(atz), &offset, NULL);
......@@ -2106,14 +2106,14 @@ static void test_read_write(void)
return;
}
ok(ret == WAIT_OBJECT_0, "WaitForSingleObject error %ld\n", ret);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == sizeof(atz), "expected sizeof(atz), got %Iu\n", iob.Information);
ret = SetCommMask(hcom, EV_RXCHAR);
ok(ret, "SetCommMask error %ld\n", GetLastError());
S(U(ovl_wait)).Offset = 0;
S(U(ovl_wait)).OffsetHigh = 0;
ovl_wait.Offset = 0;
ovl_wait.OffsetHigh = 0;
ovl_wait.hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
trace("waiting 3 secs for modem response...\n");
......@@ -2147,39 +2147,39 @@ static void test_read_write(void)
ok(GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
ok(bytes == 0, "bytes %lu\n", bytes);
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
status = pNtReadFile(hcom, 0, NULL, NULL, &iob, buf, 0, NULL, NULL);
ok(status == STATUS_INVALID_PARAMETER, "expected STATUS_INVALID_PARAMETER, got %#lx\n", status);
ok(U(iob).Status == -1, "expected -1, got %#lx\n", U(iob).Status);
ok(iob.Status == -1, "expected -1, got %#lx\n", iob.Status);
ok(iob.Information == -1, "expected -1, got %Id\n", iob.Information);
for (i = -20; i < 20; i++)
{
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = (LONGLONG)i;
status = pNtReadFile(hcom, 0, NULL, NULL, &iob, buf, 0, &offset, NULL);
if (i >= 0)
{
ok(status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, status);
ok(U(iob).Status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "%ld: expected STATUS_SUCCESS, got %#lx\n", i, iob.Status);
ok(iob.Information == 0, "%ld: expected 0, got %Iu\n", i, iob.Information);
}
else
{
ok(status == STATUS_INVALID_PARAMETER, "%ld: expected STATUS_INVALID_PARAMETER, got %#lx\n", i, status);
ok(U(iob).Status == -1, "%ld: expected -1, got %#lx\n", i, U(iob).Status);
ok(iob.Status == -1, "%ld: expected -1, got %#lx\n", i, iob.Status);
ok(iob.Information == -1, "%ld: expected -1, got %Id\n", i, iob.Information);
}
}
U(iob).Status = -1;
iob.Status = -1;
iob.Information = -1;
offset.QuadPart = 0;
status = pNtReadFile(hcom, 0, NULL, NULL, &iob, buf, 1, &offset, NULL);
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", status);
ok(U(iob).Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", U(iob).Status);
ok(iob.Status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#lx\n", iob.Status);
ok(iob.Information == 1, "expected 1, got %Iu\n", iob.Information);
goto done;
}
......
......@@ -2183,8 +2183,8 @@ static void test_offset_in_overlapped_structure(void)
ok(done == sizeof(buf), "expected number of bytes written %lu\n", done);
memset(&ov, 0, sizeof(ov));
S(U(ov)).Offset = PATTERN_OFFSET;
S(U(ov)).OffsetHigh = 0;
ov.Offset = PATTERN_OFFSET;
ov.OffsetHigh = 0;
rc=WriteFile(hFile, pattern, sizeof(pattern), &done, &ov);
/* Win 9x does not support the overlapped I/O on files */
if (rc || GetLastError()!=ERROR_INVALID_PARAMETER) {
......@@ -2193,8 +2193,8 @@ static void test_offset_in_overlapped_structure(void)
offset = SetFilePointer(hFile, 0, NULL, FILE_CURRENT);
ok(offset == PATTERN_OFFSET + sizeof(pattern), "wrong file offset %ld\n", offset);
S(U(ov)).Offset = sizeof(buf) * 2;
S(U(ov)).OffsetHigh = 0;
ov.Offset = sizeof(buf) * 2;
ov.OffsetHigh = 0;
ret = WriteFile(hFile, pattern, sizeof(pattern), &done, &ov);
ok( ret, "WriteFile error %ld\n", GetLastError());
ok(done == sizeof(pattern), "expected number of bytes written %lu\n", done);
......@@ -2211,8 +2211,8 @@ static void test_offset_in_overlapped_structure(void)
memset(buf, 0, sizeof(buf));
memset(&ov, 0, sizeof(ov));
S(U(ov)).Offset = PATTERN_OFFSET;
S(U(ov)).OffsetHigh = 0;
ov.Offset = PATTERN_OFFSET;
ov.OffsetHigh = 0;
rc=ReadFile(hFile, buf, sizeof(pattern), &done, &ov);
/* Win 9x does not support the overlapped I/O on files */
if (rc || GetLastError()!=ERROR_INVALID_PARAMETER) {
......@@ -2277,8 +2277,8 @@ static void test_LockFile(void)
ok( !UnlockFile( handle, 10, 0, 20, 0 ), "UnlockFile 10,20 again succeeded\n" );
ok( UnlockFile( handle, 5, 0, 5, 0 ), "UnlockFile 5,5 failed\n" );
S(U(overlapped)).Offset = 100;
S(U(overlapped)).OffsetHigh = 0;
overlapped.Offset = 100;
overlapped.OffsetHigh = 0;
overlapped.hEvent = 0;
/* Test for broken LockFileEx a la Windows 95 OSR2. */
......@@ -2290,7 +2290,7 @@ static void test_LockFile(void)
}
/* overlapping shared locks are OK */
S(U(overlapped)).Offset = 150;
overlapped.Offset = 150;
limited_UnLockFile || ok( LockFileEx( handle, 0, 0, 100, 0, &overlapped ), "LockFileEx 150,100 failed\n" );
/* but exclusive is not */
......@@ -2299,13 +2299,13 @@ static void test_LockFile(void)
"LockFileEx exclusive 150,50 succeeded\n" );
if (!UnlockFileEx( handle, 0, 100, 0, &overlapped ))
{ /* UnLockFile is capable. */
S(U(overlapped)).Offset = 100;
overlapped.Offset = 100;
ok( !UnlockFileEx( handle, 0, 100, 0, &overlapped ),
"UnlockFileEx 150,100 again succeeded\n" );
}
/* shared lock can overlap exclusive if handles are equal */
S(U(overlapped)).Offset = 300;
overlapped.Offset = 300;
ok( LockFileEx( handle, LOCKFILE_EXCLUSIVE_LOCK, 0, 100, 0, &overlapped ),
"LockFileEx exclusive 300,100 failed\n" );
ok( !LockFileEx( handle2, LOCKFILE_FAIL_IMMEDIATELY, 0, 100, 0, &overlapped ),
......@@ -3245,8 +3245,8 @@ static void test_async_file_errors(void)
HANDLE hFile;
LPVOID lpBuffer = HeapAlloc(GetProcessHeap(), 0, 4096);
OVERLAPPED ovl;
S(U(ovl)).Offset = 0;
S(U(ovl)).OffsetHigh = 0;
ovl.Offset = 0;
ovl.OffsetHigh = 0;
ovl.hEvent = hSem;
completion_count = 0;
szFile[0] = '\0';
......@@ -3270,7 +3270,7 @@ static void test_async_file_errors(void)
break;
if (!GetOverlappedResult(hFile, &ovl, &count, FALSE))
break;
S(U(ovl)).Offset += count;
ovl.Offset += count;
/* i/o completion routine only called if ReadFileEx returned success.
* we only care about violations of this rule so undo what should have
* been done */
......@@ -4458,7 +4458,7 @@ static void test_OpenFileById(void)
/* open the temp folder itself */
fileIdDescr.dwSize = sizeof(fileIdDescr);
fileIdDescr.Type = FileIdType;
U(fileIdDescr).FileId = bothDirInfo->FileId;
fileIdDescr.FileId = bothDirInfo->FileId;
handle = pOpenFileById(directory, &fileIdDescr, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, 0);
todo_wine
ok(handle != INVALID_HANDLE_VALUE, "OpenFileById: failed to open the temp folder itself, got error %lu.\n", GetLastError());
......@@ -4495,7 +4495,7 @@ static void test_OpenFileById(void)
fileIdDescr.dwSize = sizeof(fileIdDescr);
fileIdDescr.Type = FileIdType;
U(fileIdDescr).FileId = bothDirInfo->FileId;
fileIdDescr.FileId = bothDirInfo->FileId;
handle = pOpenFileById(directory, &fileIdDescr, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, 0);
ok(handle != INVALID_HANDLE_VALUE, "OpenFileById: failed to open the file, got error %lu.\n", GetLastError());
......@@ -4828,8 +4828,8 @@ static void test_WriteFileGather(void)
/* start read at EOF */
memset( &ovl, 0, sizeof(ovl) );
ovl.hEvent = evt;
S(U(ovl)).OffsetHigh = 0;
S(U(ovl)).Offset = si.dwPageSize;
ovl.OffsetHigh = 0;
ovl.Offset = si.dwPageSize;
memset( fse, 0, sizeof(fse) );
fse[0].Buffer = rbuf1;
SetLastError( 0xdeadbeef );
......@@ -5665,7 +5665,7 @@ static void test_overlapped_read(void)
ok(ret, "Unexpected error %lu.\n", GetLastError());
ok(bytes_count == TEST_OVERLAPPED_READ_SIZE, "Unexpected read size %lu.\n", bytes_count);
S(U(ov)).Offset = bytes_count;
ov.Offset = bytes_count;
ret = ReadFile(hfile, buffer, TEST_OVERLAPPED_READ_SIZE, &bytes_count, &ov);
err = GetLastError();
/* Win8+ return ERROR_IO_PENDING like stated in MSDN, while older ones
......
......@@ -396,7 +396,7 @@ static BOOL query_image_section( int id, const char *dll_name, const IMAGE_NT_HE
cor_header = section_data;
}
ok( (char *)image.TransferAddress == (char *)entry_point ||
(S(U(image)).ImageDynamicallyRelocated && LOWORD(image.TransferAddress) == LOWORD(entry_point)),
(image.ImageDynamicallyRelocated && LOWORD(image.TransferAddress) == LOWORD(entry_point)),
"%u: TransferAddress wrong %p / %p (%08lx)\n", id,
image.TransferAddress, entry_point, nt_header->OptionalHeader.AddressOfEntryPoint );
ok( image.ZeroBits == 0, "%u: ZeroBits wrong %08lx\n", id, image.ZeroBits );
......@@ -455,48 +455,48 @@ static BOOL query_image_section( int id, const char *dll_name, const IMAGE_NT_HE
(cor_header->MajorRuntimeVersion > 2 ||
(cor_header->MajorRuntimeVersion == 2 && cor_header->MinorRuntimeVersion >= 5)))
{
ok( S(U(image)).ComPlusILOnly || broken(is_winxp),
"%u: wrong ComPlusILOnly flags %02x\n", id, U(image).ImageFlags );
ok( image.ComPlusILOnly || broken(is_winxp),
"%u: wrong ComPlusILOnly flags %02x\n", id, image.ImageFlags );
if (nt_header->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC &&
!(cor_header->Flags & COMIMAGE_FLAGS_32BITREQUIRED))
ok( S(U(image)).ComPlusNativeReady || broken(is_winxp),
"%u: wrong ComPlusNativeReady flags %02x\n", id, U(image).ImageFlags );
ok( image.ComPlusNativeReady || broken(is_winxp),
"%u: wrong ComPlusNativeReady flags %02x\n", id, image.ImageFlags );
else
ok( !S(U(image)).ComPlusNativeReady,
"%u: wrong ComPlusNativeReady flags %02x\n", id, U(image).ImageFlags );
ok( !image.ComPlusNativeReady,
"%u: wrong ComPlusNativeReady flags %02x\n", id, image.ImageFlags );
if (nt_header->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC &&
(cor_header->Flags & COMIMAGE_FLAGS_32BITPREFERRED))
ok( S(U(image)).ComPlusPrefer32bit ||
ok( image.ComPlusPrefer32bit ||
broken( !image.MajorOperatingSystemVersion ), /* before win10 */
"%u: wrong ComPlusPrefer32bit flags %02x\n", id, U(image).ImageFlags );
"%u: wrong ComPlusPrefer32bit flags %02x\n", id, image.ImageFlags );
else
ok( !S(U(image)).ComPlusPrefer32bit, "%u: wrong ComPlusPrefer32bit flags %02x\n", id, U(image).ImageFlags );
ok( !image.ComPlusPrefer32bit, "%u: wrong ComPlusPrefer32bit flags %02x\n", id, image.ImageFlags );
}
else
{
ok( !S(U(image)).ComPlusILOnly, "%u: wrong ComPlusILOnly flags %02x\n", id, U(image).ImageFlags );
ok( !S(U(image)).ComPlusNativeReady, "%u: wrong ComPlusNativeReady flags %02x\n", id, U(image).ImageFlags );
ok( !S(U(image)).ComPlusPrefer32bit, "%u: wrong ComPlusPrefer32bit flags %02x\n", id, U(image).ImageFlags );
ok( !image.ComPlusILOnly, "%u: wrong ComPlusILOnly flags %02x\n", id, image.ImageFlags );
ok( !image.ComPlusNativeReady, "%u: wrong ComPlusNativeReady flags %02x\n", id, image.ImageFlags );
ok( !image.ComPlusPrefer32bit, "%u: wrong ComPlusPrefer32bit flags %02x\n", id, image.ImageFlags );
}
if (!(nt_header->OptionalHeader.SectionAlignment % page_size))
ok( !S(U(image)).ImageMappedFlat, "%u: wrong ImageMappedFlat flags %02x\n", id, U(image).ImageFlags );
ok( !image.ImageMappedFlat, "%u: wrong ImageMappedFlat flags %02x\n", id, image.ImageFlags );
else
{
/* winxp doesn't support any of the loader flags */
if (!S(U(image)).ImageMappedFlat) is_winxp = TRUE;
ok( S(U(image)).ImageMappedFlat || broken(is_winxp),
"%u: wrong ImageMappedFlat flags %02x\n", id, U(image).ImageFlags );
if (!image.ImageMappedFlat) is_winxp = TRUE;
ok( image.ImageMappedFlat || broken(is_winxp),
"%u: wrong ImageMappedFlat flags %02x\n", id, image.ImageFlags );
}
if (!(nt_header->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE))
ok( !S(U(image)).ImageDynamicallyRelocated || broken( S(U(image)).ComPlusILOnly ), /* <= win7 */
"%u: wrong ImageDynamicallyRelocated flags %02x\n", id, U(image).ImageFlags );
ok( !image.ImageDynamicallyRelocated || broken( image.ComPlusILOnly ), /* <= win7 */
"%u: wrong ImageDynamicallyRelocated flags %02x\n", id, image.ImageFlags );
else if (image.ImageContainsCode && !cor_header)
ok( S(U(image)).ImageDynamicallyRelocated || broken(is_winxp),
"%u: wrong ImageDynamicallyRelocated flags %02x\n", id, U(image).ImageFlags );
ok( image.ImageDynamicallyRelocated || broken(is_winxp),
"%u: wrong ImageDynamicallyRelocated flags %02x\n", id, image.ImageFlags );
else
ok( !S(U(image)).ImageDynamicallyRelocated || broken(TRUE), /* <= win8 */
"%u: wrong ImageDynamicallyRelocated flags %02x\n", id, U(image).ImageFlags );
ok( !S(U(image)).BaseBelow4gb, "%u: wrong BaseBelow4gb flags %02x\n", id, U(image).ImageFlags );
ok( !image.ImageDynamicallyRelocated || broken(TRUE), /* <= win8 */
"%u: wrong ImageDynamicallyRelocated flags %02x\n", id, image.ImageFlags );
ok( !image.BaseBelow4gb, "%u: wrong BaseBelow4gb flags %02x\n", id, image.ImageFlags );
map_size.QuadPart = (nt_header->OptionalHeader.SizeOfImage + page_size - 1) & ~(page_size - 1);
status = pNtQuerySection( mapping, SectionBasicInformation, &info, sizeof(info), NULL );
......@@ -1256,7 +1256,7 @@ static void test_Loader(void)
cor_header.MajorRuntimeVersion = 2;
cor_header.MinorRuntimeVersion = 4;
cor_header.Flags = COMIMAGE_FLAGS_ILONLY;
U(cor_header).EntryPointToken = 0xbeef;
cor_header.EntryPointToken = 0xbeef;
status = map_image_section( &nt_header, &section, &cor_header, __LINE__ );
ok( status == STATUS_SUCCESS, "NtCreateSection error %08lx\n", status );
......@@ -1630,7 +1630,7 @@ static void test_ImportDescriptors(void)
{
LPCSTR module_name = RVAToAddr(import_chunk->Name, kernel32_module);
PIMAGE_THUNK_DATA name_table = RVAToAddr(
U(*import_chunk).OriginalFirstThunk, kernel32_module);
import_chunk->OriginalFirstThunk, kernel32_module);
PIMAGE_THUNK_DATA iat = RVAToAddr(
import_chunk->FirstThunk, kernel32_module);
ok(module_name != NULL, "Imported module name should not be NULL\n");
......@@ -2236,7 +2236,7 @@ static void test_import_resolution(void)
nt.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_TLS].VirtualAddress = DATA_RVA(&data.tls);
memset( &data, 0, sizeof(data) );
U(data.descr[0]).OriginalFirstThunk = DATA_RVA( data.original_thunks );
data.descr[0].OriginalFirstThunk = DATA_RVA( data.original_thunks );
data.descr[0].FirstThunk = DATA_RVA( data.thunks );
data.descr[0].Name = DATA_RVA( data.module );
strcpy( data.module, "kernel32.dll" );
......
......@@ -2696,8 +2696,8 @@ static void test_readfileex_pending(void)
ok(GetLastError() == ERROR_INVALID_HANDLE, "wrong error %lu\n", GetLastError());
ok(num_bytes == 0, "expected 0, got %lu\n", num_bytes);
S(U(overlapped)).Offset = 0;
S(U(overlapped)).OffsetHigh = 0;
overlapped.Offset = 0;
overlapped.OffsetHigh = 0;
overlapped.Internal = -1;
overlapped.InternalHigh = -1;
overlapped.hEvent = event;
......
......@@ -2293,11 +2293,11 @@ static void test_SystemInfo(void)
pGetNativeSystemInfo(&nsi);
if (is_wow64)
{
if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
{
ok(S(U(nsi)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64,
ok(nsi.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64,
"Expected PROCESSOR_ARCHITECTURE_AMD64, got %d\n",
S(U(nsi)).wProcessorArchitecture);
nsi.wProcessorArchitecture);
if (pIsWow64Process2 && pIsWow64Process2(GetCurrentProcess(), &machine, &native_machine) &&
native_machine == IMAGE_FILE_MACHINE_ARM64)
{
......@@ -2310,9 +2310,9 @@ static void test_SystemInfo(void)
}
else
{
ok(S(U(si)).wProcessorArchitecture == S(U(nsi)).wProcessorArchitecture,
ok(si.wProcessorArchitecture == nsi.wProcessorArchitecture,
"Expected no difference for wProcessorArchitecture, got %d and %d\n",
S(U(si)).wProcessorArchitecture, S(U(nsi)).wProcessorArchitecture);
si.wProcessorArchitecture, nsi.wProcessorArchitecture);
ok(si.dwProcessorType == nsi.dwProcessorType,
"Expected no difference for dwProcessorType, got %ld and %ld\n",
si.dwProcessorType, nsi.dwProcessorType);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment