Don't assume that enums and uint32_t parameters are identical. Clang
16 changes the diagonstic for incompatible function pointer types
from a warning into an error by default.
This fixes the following error, when built (for aarch64, but probably
also for other architectures) in MSVC mode:
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:1083:13: error: incompatible function pointer types passing 'uint32_t (struct vkd3d_spirv_builder *, uint32_t, SpvDim, uint32_t, uint32_t, uint32_t, uint32_t, SpvImageFormat)' (aka 'unsigned int (struct vkd3d_spirv_builder *, unsigned int, enum SpvDim_, unsigned int, unsigned int, unsigned int, unsigned int, enum SpvImageFormat_)') to parameter of type 'vkd3d_spirv_build7_pfn' (aka 'unsigned int (*)(struct vkd3d_spirv_builder *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)') [-Wincompatible-function-pointer-types]
vkd3d_spirv_build_op_type_image);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:612:68: note: passing argument to parameter 'build_pfn' here
SpvOp op, const uint32_t *operands, vkd3d_spirv_build7_pfn build_pfn)
^
Clang 16 is defaulting -Wincompatible-function-pointer-types to
an error instead of a warning. This isn't an issue for most of Wine,
but the error shows up in a lot of cases if doing a non-PE build for
ARM (32 bit, 64 has no such issues), in particular around the integration
of libxml2 and faudio.
The root cause of the issue is that some functions are specified with
e.g. __attribute__((pcs("aapcs-vfp"))) - which is equal to the
default calling convention when compiling with -mfloat-abi=hard - but
Clang's warning doesn't treat such function pointers as equal. (This
could maybe be considered a bug or limitation in Clang though.)
There's also some smaller amount of cases where our attributes
actually do conflict, where we mix __attribute__((pcs("aapcs"))), i.e.
arm softfloat calling convention, with the default calling convention
(which is set to hardfloat), but they drown in the noise from the
other ones.
Therefore, on arm, try to downgrade this diagnostic back to a warning,
not an error - while keeping the warnings visible.
Signed-off-by: Martin Storsjö <martin@martin.st>
Automation interfaces should use signed types, because VBScript does not support unsigned types like VT_UI4.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53542
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
Automation interfaces should use signed types, because VBScript does not support unsigned types like VT_UI4.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53542
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
DWORD is unsigned and will be converted to VT_UI4 variant when used from VBScript.
But VT_UI4 is no VBScript data type and should not be used as retval.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53542
Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net>
mf_media_type_from_wg_format() may return NULL.
Fix Airborne Kingdom crash at start because WG_AUDIO_FORMAT_UNKNOWN is passed to
mf_media_type_from_wg_format().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>