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

Charles Davis cdavis5x at gmail.com
Fri Feb 19 23:48:46 CST 2016


On Fri, Feb 19, 2016 at 9:49 PM, Bruno Jesus <00cpxxx at gmail.com> wrote:
>
> 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.
It actually feels weird to me, too. Originally, I cast them in the debug
prints, but when I did that in advapi32, AJ wanted me to just change the
variable type. So that's what I'm doing now.

Chip

>
> Best wishes,
> Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160219/51df5a47/attachment.html>


More information about the wine-devel mailing list