[PATCH 2/2] winecoreaudio.drv: Don't print 32-bit values as long integers. (Clang)
Dmitry Timoshkov
dmitry at baikal.ru
Sat Feb 20 00:47:33 CST 2016
Charles Davis <cdavis5x at gmail.com> wrote:
> > > --- 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.
What's wrong with using correct printf format specifier instead?
--
Dmitry.
More information about the wine-devel
mailing list