From 1290f37750486d9f036d436ea9e397cbfd24fb13 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 7 Apr 2014 13:55:22 -0700 Subject: Silence an MSVC warning about -1u --- Alc/backends/winmm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c index 93d2b328..acffd2f3 100644 --- a/Alc/backends/winmm.c +++ b/Alc/backends/winmm.c @@ -287,7 +287,7 @@ static ALCenum WinMMOpenPlayback(ALCdevice *Device, const ALCchar *deviceName) { WinMMData *data = NULL; const al_string *iter, *end; - UINT DeviceID = -1u; + UINT DeviceID = 0u-1u; MMRESULT res; if(VECTOR_SIZE(PlaybackDevices) == 0) @@ -305,7 +305,7 @@ static ALCenum WinMMOpenPlayback(ALCdevice *Device, const ALCchar *deviceName) break; } } - if(DeviceID == -1u) + if(DeviceID == 0u-1u) return ALC_INVALID_VALUE; data = calloc(1, sizeof(*data)); @@ -507,7 +507,7 @@ static ALCenum WinMMOpenCapture(ALCdevice *Device, const ALCchar *deviceName) ALbyte *BufferData = NULL; DWORD CapturedDataSize; WinMMData *data = NULL; - UINT DeviceID = -1u; + UINT DeviceID = 0u-1u; ALint BufferSize; MMRESULT res; ALuint i; @@ -527,7 +527,7 @@ static ALCenum WinMMOpenCapture(ALCdevice *Device, const ALCchar *deviceName) break; } } - if(DeviceID == -1u) + if(DeviceID == 0u-1u) return ALC_INVALID_VALUE; switch(Device->FmtChans) -- cgit v1.2.3