diff mbox

[2/2] coreaudio: Avoid formatting UInt32 type

Message ID 1308839086-29122-2-git-send-email-andreas.faerber@web.de
State New
Headers show

Commit Message

Andreas Färber June 23, 2011, 2:24 p.m. UTC
coreaudioVoiceOut's audioDevicePropertyBufferFrameSize is defined as UInt32
and is being used by reference for AudioDevice{Get,Set}Property().
UInt32 is unsigned int on __LP64__ but unsigned long otherwise.

Cast to POSIX type and use PRIu32 format specifier to hide the details.
This avoids a warning on ppc64.

Cc: malc <av1474@comtv.ru>
Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
---
 audio/coreaudio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Andreas Färber June 23, 2011, 2:56 p.m. UTC | #1
$subject missing v2

Am 23.06.2011 um 16:24 schrieb Andreas Färber:

> coreaudioVoiceOut's audioDevicePropertyBufferFrameSize is defined as  
> UInt32
> and is being used by reference for AudioDevice{Get,Set}Property().
> UInt32 is unsigned int on __LP64__ but unsigned long otherwise.
>
> Cast to POSIX type and use PRIu32 format specifier to hide the  
> details.
> This avoids a warning on ppc64.
>
> Cc: malc <av1474@comtv.ru>
> Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
> ---
> audio/coreaudio.c |    4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/audio/coreaudio.c b/audio/coreaudio.c
> index 508bcbe..5964c62 100644
> --- a/audio/coreaudio.c
> +++ b/audio/coreaudio.c
> @@ -360,8 +360,8 @@ static int coreaudio_init_out (HWVoiceOut *hw,  
> struct audsettings *as)
>         &core->audioDevicePropertyBufferFrameSize);
>     if (status != kAudioHardwareNoError) {
>         coreaudio_logerr2 (status, typ,
> -                           "Could not set device buffer frame size  
> %ld\n",
> -                           core->audioDevicePropertyBufferFrameSize);
> +                           "Could not set device buffer frame size  
> %" PRIu32 "\n",
> +                           (uint32_t)core- 
> >audioDevicePropertyBufferFrameSize);
>         return -1;
>     }
>
> -- 
> 1.7.5.3
>
>
diff mbox

Patch

diff --git a/audio/coreaudio.c b/audio/coreaudio.c
index 508bcbe..5964c62 100644
--- a/audio/coreaudio.c
+++ b/audio/coreaudio.c
@@ -360,8 +360,8 @@  static int coreaudio_init_out (HWVoiceOut *hw, struct audsettings *as)
         &core->audioDevicePropertyBufferFrameSize);
     if (status != kAudioHardwareNoError) {
         coreaudio_logerr2 (status, typ,
-                           "Could not set device buffer frame size %ld\n",
-                           core->audioDevicePropertyBufferFrameSize);
+                           "Could not set device buffer frame size %" PRIu32 "\n",
+                           (uint32_t)core->audioDevicePropertyBufferFrameSize);
         return -1;
     }