Huw Davies : winecoreaudio: Cast enums to ints when printing.

Alexandre Julliard julliard at winehq.org
Wed Mar 3 15:47:30 CST 2021


Module: wine
Branch: master
Commit: a33c14fd443adc06045a303d118eb4d0500b5e9e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=a33c14fd443adc06045a303d118eb4d0500b5e9e

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Mar  3 14:49:05 2021 +0000

winecoreaudio: Cast enums to ints when printing.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winecoreaudio.drv/mmdevdrv.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c
index b002189e199..bc153d92511 100644
--- a/dlls/winecoreaudio.drv/mmdevdrv.c
+++ b/dlls/winecoreaudio.drv/mmdevdrv.c
@@ -1748,7 +1748,7 @@ static DWORD ca_channel_layout_to_channel_mask(const AudioChannelLayout *layout)
 
     for (i = 0; i < layout->mNumberChannelDescriptions; ++i) {
         switch (layout->mChannelDescriptions[i].mChannelLabel) {
-            default: FIXME("Unhandled channel 0x%x\n", layout->mChannelDescriptions[i].mChannelLabel); break;
+            default: FIXME("Unhandled channel 0x%x\n", (unsigned int)layout->mChannelDescriptions[i].mChannelLabel); break;
             case kAudioChannelLabel_Left: mask |= SPEAKER_FRONT_LEFT; break;
             case kAudioChannelLabel_Mono:
             case kAudioChannelLabel_Center: mask |= SPEAKER_FRONT_CENTER; break;
@@ -1893,12 +1893,13 @@ static HRESULT WINAPI AudioClient_GetMixFormat(IAudioClient3 *iface,
         sc = AudioObjectGetPropertyData(This->adevid, &addr, 0, NULL, &size, layout);
         if(sc == noErr){
             TRACE("Got channel layout: {tag: 0x%x, bitmap: 0x%x, num_descs: %u}\n",
-                    layout->mChannelLayoutTag, layout->mChannelBitmap, layout->mNumberChannelDescriptions);
+                  (unsigned int)layout->mChannelLayoutTag, (unsigned int)layout->mChannelBitmap,
+                  (unsigned int)layout->mNumberChannelDescriptions);
 
             if(layout->mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelDescriptions){
                 convert_channel_layout(layout, fmt);
             }else{
-                WARN("Haven't implemented support for this layout tag: 0x%x, guessing at layout\n", layout->mChannelLayoutTag);
+                WARN("Haven't implemented support for this layout tag: 0x%x, guessing at layout\n", (unsigned int)layout->mChannelLayoutTag);
                 fmt->Format.nChannels = 0;
             }
         }else{




More information about the wine-cvs mailing list