On 2010/12/21 04:18, Greg Ward <g...@gerg.ca> wrote:
> On Sat, Dec 18, 2010 at 2:07 PM, Max Kellermann <m...@duempel.org> wrote:
> > good work so far.  The first patch emits three printf warnings:
> >
> >  src/output/osx_plugin.c:234: warning: format '%lu' expects type 'long 
> > unsigned int', but argument 5 has type 'AudioDeviceID'
> >  src/output/osx_plugin.c:239: warning: format '%lu' expects type 'long 
> > unsigned int', but argument 4 has type 'AudioDeviceID'
> >  src/output/osx_plugin.c:264: warning: format '%lu' expects type 'long 
> > unsigned int', but argument 4 has type 'AudioDeviceID'
> 
> D'ohh.  You must be building on a 64-bit platform, because I don't get
> that on 32-bit OS X 10.4.  The typedefs on 10.4 are:
> 
>   typedef unsigned long UInt32;
>   typedef UInt32 AudioObjectID;
>   typedef AudioObjectID AudioDeviceID;
> 
> and the warnings are from passing AudioDeviceID variables to %lu.

The code must compile (and not crash), even if the underlying type
definitions changes.  So if you pass some externally defined type to
printf, you must cast it explicitly in any case, because the compiler
will not.

I've merged both of your patches, thanks!

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to