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. Given that AudioDeviceID is clearly meant to be 32-bit unsigned, wouldn't it be better to cast to "unsigned int" and use %u? E.g., relative to my last patch: --- a/src/output/osx_plugin.c +++ b/src/output/osx_plugin.c @@ -229,15 +229,15 @@ osx_output_set_device(struct osx_output *oo, GError **error) if (status != noErr) { g_set_error(error, osx_output_quark(), status, "Unable to determine OS X device name " - "(device %lu): %s", - deviceids[i], + "(device %u): %s", + (unsigned int) deviceids[i], GetMacOSStatusCommentString(status)); ret = false; goto done; } if (strcmp(oo->device_name, name) == 0) { - g_debug("found matching device: ID=%lu, name=%s", - deviceids[i], name); + g_debug("found matching device: ID=%u, name=%s", + (unsigned int) deviceids[i], name); break; } } That seems to work fine on OS X 10.4. I'll send a new patch shortly. If you really prefer "unsigned long" and %lu, just say the word and I'll try again. Greg ------------------------------------------------------------------------------ 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