[PATCH 2/2] winecoreaudio.drv: Don't print 32-bit values as long integers. (Clang)

Bruno Jesus 00cpxxx at gmail.com
Fri Feb 19 22:49:29 CST 2016


On Sat, Feb 20, 2016 at 4:18 AM, Charles Davis <cdavis5x at gmail.com> wrote:
>
> Signed-off-by: Charles Davis <cdavis5x at gmail.com>
> ---
> I couldn't get rid of all the casts. In particular, some of them are of a
> system-defined structure that we obviously can't change.
>
>  dlls/winecoreaudio.drv/mmdevdrv.c | 84 +++++++++++++++++++--------------------
>  1 file changed, 42 insertions(+), 42 deletions(-)
>
> diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c
> index 60ff3d9..90124bc 100644
> --- a/dlls/winecoreaudio.drv/mmdevdrv.c
> +++ b/dlls/winecoreaudio.drv/mmdevdrv.c
> @@ -385,10 +385,10 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids,
>          GUID **guids, UINT *num, UINT *def_index)
>  {
>      UInt32 devsize, size;
> -    AudioDeviceID *devices;
> +    unsigned int *devices;
>      AudioDeviceID default_id;
>      AudioObjectPropertyAddress addr;
> -    OSStatus sc;
> +    int sc;
>      int i, ndevices;

Hi, Charles. I usually don't review patches but it feels weird to me
that you are changing the type of the variable because
AudioObjectGetPropertyData expects an AudioDeviceID and not an
unsigned int. Even if they are the same I believe using the correct
type is better. The same for OSStatus which is the return for
AudioObjectGetPropertyData.

Best wishes,
Bruno



More information about the wine-devel mailing list