From 21bfa428d1f6cd84aa5b2da0eef047d3130babe2 Mon Sep 17 00:00:00 2001 From: Kouhei Sutou Date: Wed, 9 Sep 2015 13:58:05 +0900 Subject: [PATCH] directsoundsrc: fix build error for 64bit Windows build by MinGW Casting to UINT from HMIXER generates the following warning with 64bit Windows target MinGW: gstdirectsoundsrc.c: In function 'gst_directsound_src_mixer_find': gstdirectsoundsrc.c:733:30: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] mmres = mixerGetDevCaps ((UINT) dsoundsrc->mixer, ^ cc1: all warnings being treated as errors We can use portable GPOINTER_TO_UINT() macro for this propose. https://bugzilla.gnome.org/show_bug.cgi?id=754756 --- sys/directsound/gstdirectsoundsrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/directsound/gstdirectsoundsrc.c b/sys/directsound/gstdirectsoundsrc.c index 0bd77e8294..18f49f881b 100644 --- a/sys/directsound/gstdirectsoundsrc.c +++ b/sys/directsound/gstdirectsoundsrc.c @@ -730,7 +730,7 @@ gst_directsound_src_mixer_find (GstDirectSoundSrc * dsoundsrc, if (mmres != MMSYSERR_NOERROR) continue; - mmres = mixerGetDevCaps ((UINT) dsoundsrc->mixer, + mmres = mixerGetDevCaps (GPOINTER_TO_UINT (dsoundsrc->mixer), mixer_caps, sizeof (MIXERCAPS)); if (mmres != MMSYSERR_NOERROR) {