On Thu Sep 15 08:20:51 2022 +0000, Huw Davies wrote:
This is producing a warning for me:
gcc -m32 -c -o dlls/winecoreaudio.drv/coreaudio.o dlls/winecoreaudio.drv/coreaudio.c -Idlls/winecoreaudio.drv -Iinclude -D__WINESRC__ \ -D_UCRT -DWINE_UNIX_LIB -Wall -pipe -fno-stack-protector -fno-strict-aliasing \ -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Winit-self -Wno-pragma-pack \ -Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings -Wpointer-arith -gdwarf-4 \ -fno-omit-frame-pointer -fPIC -fasynchronous-unwind-tables -O2 -g -Wno-deprecated-declarations -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 dlls/winecoreaudio.drv/coreaudio.c:280:63: warning: values of type 'AudioDeviceID' should not be used as format arguments; add an explicit cast to 'unsigned int' instead [-Wformat] sprintf((char *)params->endpoints + offset, "%u", info[i].id); ~~ ^~~~~~~~~~ %u (unsigned int) 1 warning generated.
You'll need to cast `info[i].id` to an `unsigned int`.
Interesting. In `AUDDRV_GetAudioEndpoint()` I used `%lu`, but just because I remembered a warning appearing on Linux when building for 64 bit.