Commit graph

159556 commits

Author SHA1 Message Date
Shaun Ren 6d2a9af43b msvcrt: Fix strncmp return value.
Some programs, such as Final Fantasy IV (3D remake), expect strncmp
to return exactly +/-1 when the strings are not equal.

Signed-off-by: Shaun Ren <sren@codeweavers.com>
2022-09-19 20:12:32 +02:00
Gijs Vermeulen 1b3f61d7a5 ntdll: Add RtlDosPathNameToRelativeNtPathName_U.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53700
2022-09-19 20:12:02 +02:00
Nikolay Sivov 1ceba3533e kernelbase: Add MapViewOfFileFromApp().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-19 20:11:37 +02:00
Nikolay Sivov 3ede82e2a8 kernelbase: Add CreateFileMappingFromApp().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-19 20:11:36 +02:00
Nikolay Sivov 40d0e55d4c kernelbase: Add OpenFileMappingFromApp().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-19 20:11:35 +02:00
Alistair Leslie-Hughes b114b2c9eb wininet: Use standard HTTP_ADD Flags. 2022-09-19 20:10:47 +02:00
Eric Pouech 4bdf92cb7f jscript: Fix GCC 12.2 warning.
When initializing a jsstr_inline_t with a len < 3, the size passed
for the allocation is smaller then the size of the structure
(as the later is rounded up to the alignment = 4 bytes).

GCC 12.2 complains about this when dereferencing the pointer to
the structure as the size passed for allocation is smaller than the
size of the structure.

The warning is fixed by using flexible array member in
jsstr_inline_t. Given the rounding behavior in memory allocation, this
should not change the size of allocated blocks.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-09-19 20:10:36 +02:00
Alistair Leslie-Hughes 5308c71cfd oledb32/tests: Free returned property set memory.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36312
2022-09-19 20:10:26 +02:00
Aurimas Fišeras e04a406a0a po: Update Lithuanian translation. 2022-09-19 20:10:13 +02:00
Zebediah Figura f5b9213725 ntdll: Do not check for malloc() failure in get_initial_environment.
This is called early in process startup; malloc() should definitely never fail here.

This fixes an uninitialized variable warning with gcc 12.2:

In function ‘build_initial_params’,
    inlined from ‘init_startup_info’ at ../wine/dlls/ntdll/unix/env.c:2004:18:
../wine/dlls/ntdll/unix/env.c:1910:12: error: ‘env_pos’ may be used uninitialized [-Werror=maybe-uninitialized]
 1910 |     path = get_env_var( env, env_pos, pathW, 4 );
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../wine/dlls/ntdll/unix/env.c: In function ‘init_startup_info’:
../wine/dlls/ntdll/unix/env.c:1903:18: note: ‘env_pos’ declared here
 1903 |     SIZE_T size, env_pos, env_size;
      |                  ^~~~~~~
2022-09-16 21:08:28 +02:00
Rémi Bernon ed0d100ec9 winegstreamer: Check for already opened stream in wm_reader_open*. 2022-09-16 21:08:20 +02:00
Rémi Bernon 359258560e winegstreamer: Use a dedicated CS to serialize async reader commands. 2022-09-16 21:08:20 +02:00
Rémi Bernon daf10989f8 winegstreamer: Introduce a new async_reader_deliver_sample helper. 2022-09-16 21:08:20 +02:00
Rémi Bernon 4a1e95c814 winegstreamer: Wake thread when async reader user clock is modified. 2022-09-16 21:08:20 +02:00
Eric Pouech af0fa4b8a8 glu32: Fix GCC 12.2 warnings.
GCC complains about writing 4x4 floats into a pointer to a float.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-09-16 19:15:05 +02:00
Alistair Leslie-Hughes b9d07d6cb4 wininet: Clear cached credentials after the first failed attempt.
Windows when using cached credentials will use them on the first challenge,
if then a second 403 (ACCESS_DENIED) is received, the user is prompted again
but this time with the password and save checkbox cleared.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2022-09-16 19:15:05 +02:00
Davide Beatrici 8537b72202 winecoreaudio: Switch to mmdevapi's unixlib.h. 2022-09-16 19:15:05 +02:00
Davide Beatrici af1257f741 winecoreaudio: Adapt "get_capture_buffer_params" struct to mmdevapi's. 2022-09-16 19:15:05 +02:00
Davide Beatrici 0987d1b002 winecoreaudio: Adapt "release_render_buffer_params" struct to mmdevapi's. 2022-09-16 19:15:05 +02:00
Davide Beatrici 9a30a71e3b winecoreaudio: Adapt "release_stream_params" struct to mmdevapi's. 2022-09-16 19:15:05 +02:00
Davide Beatrici de9da9bcdb winecoreaudio: Adapt "create_stream_params" struct to mmdevapi's. 2022-09-16 19:15:05 +02:00
Davide Beatrici bc404b6c9c winecoreaudio: Drop "unix_" prefix in unixlib enum, apply it to the functions instead. 2022-09-16 19:15:05 +02:00
Davide Beatrici 2fa22538a5 mmdevapi: Integrate winecoreaudio's additions in unixlib.h.
The data type for "done" was accidentally changed in e29dc33aeb.

BOOL is basically the same as UINT32, but it should only be used for flags.
BOOLEAN would be better for that though, as it's single-byte.
2022-09-16 19:15:05 +02:00
Davide Beatrici 013f662c05 winecoreaudio: Switch to string as device identifier, to match other drivers. 2022-09-16 19:15:05 +02:00
Davide Beatrici 93d3ecb90f winecoreaudio: Fix RegEnumKeyExW() call passing wrong unit for the buffer size.
The function takes the number of (wide) characters in input, not bytes.
2022-09-16 19:15:05 +02:00
Nikolay Sivov 2821d9cb41 xmllite/writer: Enable some more tests for WriteNode().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-16 19:15:05 +02:00
Alistair Leslie-Hughes 493db3b1f7 ws2_32: Return a valid value for WSAIoctl SIO_IDEAL_SEND_BACKLOG_QUERY.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2022-09-16 19:13:30 +02:00
Zebediah Figura c73999f169 win32u: Copy directly into the union pointer in unpack_message().
This works around a spurious gcc warning:

../wine/dlls/win32u/message.c: In function ‘unpack_message.constprop’:
../wine/dlls/win32u/message.c:359:9: error: writing 28 bytes into a region of size 4 [-Werror=stringop-overflow=]
  359 |         memcpy( &ps->wp, &wp, sizeof(wp) );
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../wine/dlls/win32u/win32u_private.h:29,
                 from ../wine/dlls/win32u/message.c:30:
../wine/include/ntuser.h:549:15: note: destination object ‘hwnd’ of size 4
  549 |     UINT      hwnd;
      |               ^~~~
2022-09-16 19:13:24 +02:00
Zebediah Figura f66b49a496 ntdll: Calculate the necessary length after calling snprintf() in SystemWineVersionInformation.
This works around a spurious gcc warning:

../wine/dlls/ntdll/unix/system.c: In function ‘NtQuerySystemInformation’:
../wine/dlls/ntdll/unix/system.c:3176:36: error: ‘%s’ directive output between 0 and 2147483644 bytes may cause result to exceed ‘INT_MAX’ [-Werror=format-truncation=]
 3176 |         snprintf( info, size, "%s%c%s%c%s%c%s", version, 0, wine_build, 0, buf.sysname, 0, buf.release );
      |                                    ^~                       ~~~~~~~~~~
../wine/dlls/ntdll/unix/system.c:3176:9: note: ‘snprintf’ output between 8 and 2147483780 bytes into a destination of size 4294967295
 3176 |         snprintf( info, size, "%s%c%s%c%s%c%s", version, 0, wine_build, 0, buf.sysname, 0, buf.release );
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-09-16 19:13:13 +02:00
Zebediah Figura d17fe0a792 libwine: Avoid comparing the result of pointer arithmetic to zero.
gcc warns about this:

../wine/libs/wine/mmap.c: In function ‘wine_mmap_add_reserved_area_obsolete’:
../wine/libs/wine/mmap.c:504:9: error: the comparison will always evaluate as ‘true’ for the pointer operand in ‘(char *)addr + (sizetype)size’ must not be NULL [-Werror=address]
  504 |     if (!((char *)addr + size)) size--;  /* avoid wrap-around */
      |         ^
2022-09-16 19:12:52 +02:00
Zebediah Figura 539ef7c462 ntdll: Avoid comparing the result of pointer arithmetic to zero.
gcc warns about this:

../wine/dlls/ntdll/unix/virtual.c: In function ‘mmap_add_reserved_area’:
../wine/dlls/ntdll/unix/virtual.c:241:9: error: the comparison will always evaluate as ‘true’ for the pointer operand in ‘(char *)addr + (sizetype)size’ must not be NULL [-Werror=address]
  241 |     if (!((char *)addr + size)) size--;  /* avoid wrap-around */
      |         ^
2022-09-16 19:12:49 +02:00
Alexandre Julliard 5965771a9c advapi32/tests: Mark some failing tests as todo. 2022-09-16 14:07:13 +02:00
Alexandre Julliard 46164f40ab user32/tests: Don't print debug traces by default.
This reduces the test output to stay within the 32kB limit.
2022-09-16 10:23:11 +02:00
Alexandre Julliard a72bffe768 user32/tests: Only report the first todo of a failed message sequence.
This reduces the test output to stay within the 32kB limit.
2022-09-16 10:18:29 +02:00
Eric Pouech 5fa25d00d7 d3d11/tests: Introduce a clear_rtv() helper.
This fixes warnings with gcc 12.2.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-09-15 22:33:42 +02:00
Eric Pouech 6ba6f54f56 d3d10core/tests: Introduce a clear_backbuffer_rtv() helper.
This fixes warnings with gcc 12.2.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-09-15 22:33:40 +02:00
Eric Pouech ae890d5442 d3d10core/tests: Fix erroneous color parameter.
(Spotted by warnings emitted by GCC 12.2).

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-09-15 22:33:37 +02:00
Henri Verbeet 030c37ceae wined3d: Return bools from all return paths in wined3d_cs_map_upload_bo(). 2022-09-15 22:33:24 +02:00
Henri Verbeet e5f5bea390 d3d11/tests: Move the is_warp_device() call out of the loop in check_format_support().
There's no point in querying this multiple times, it's not going to change.

Perhaps more importantly, calling is_warp_device() inside a todo_wine block
will cause "Test succeeded inside todo block: ..." messages from
get_device_adapter_desc(). These appear to have been introduced by commit
fcc276ecb1. Arguably get_device_adapter_desc()
shouldn't use ok() in the first place.
2022-09-15 22:33:18 +02:00
Henri Verbeet 7d20333faf d3d11: Implement d3d11_input_layout_to_wined3d_declaration() on top of vkd3d_shader_parse_input_signature().
This was originally prompted by the fact that
wined3d_extract_shader_input_signature_from_dxbc() allocates elements with
HeapAlloc(), but d3d11_input_layout_to_wined3d_declaration() attempts to free
them with free(). That's a regression introduced by commit
b951c37b87. Since we're touching the code
though, we may as well use vkd3d_shader_parse_input_signature(), and get rid
of wined3d_extract_shader_input_signature_from_dxbc().
2022-09-15 22:33:10 +02:00
Henri Verbeet bba63771eb d3d9/tests: The expected scissor rect after a reset is equal to the back-buffer dimensions.
This appears to have gotten lost in commit
7623d0a6f5.
2022-09-15 22:33:04 +02:00
Henri Verbeet 51466755ad wined3d: Destroy the Vulkan command pool after cleaning up resources.
This fixes an issue exposed (but not caused) by commit
e553be7e77. Calling vkFreeCommandBuffers()
after the corresponding command pool was destroyed causes invalid memory
accesses. Thanks to Jacek for pointing this out.
2022-09-15 22:32:57 +02:00
Henri Verbeet 99a3bc3c2b wined3d: Fix the sub-resource index validation in wined3d_texture_update_overlay().
This condition accidentally got inverted when
wined3d_texture_validate_sub_resource_idx() was introduced in commit
44d6f2adbc.
2022-09-15 22:02:09 +02:00
Alexandre Julliard 064edf1df4 d2d1/tests: Skip subsequent todo tests for unsupported properties.
This reduces the number of printed todos in order to stay within the 32kB limit.
2022-09-15 20:55:55 +02:00
Jacek Caban 2d8850365b wininet/tests: Don't send two HTTP responses for a single request in server_thread. 2022-09-15 20:55:51 +02:00
Mohamad Al-Jaf 1df5309a82 winusb: Add WinUsb_Free stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52677
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
2022-09-15 17:45:44 +02:00
Mohamad Al-Jaf 437bdce96c include: Add winusb.h file.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf@gmail.com>
2022-09-15 17:45:26 +02:00
Georg Lehmann a37b4832bc winevulkan: Update to VK spec version 1.3.228. 2022-09-15 13:47:45 +02:00
Nikolay Sivov 90ff3c5b85 xmllite/writer: Implement WriteNodeShallow().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-15 13:47:45 +02:00
Nikolay Sivov 3cd0bfd4a7 xmllite/writer: Handle empty local name in WriteAttributeString().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-09-15 13:47:45 +02:00