[warnings] fix tautological unsigned zero compare
This commit is contained in:
parent
8ba7b65725
commit
31ef07ead7
@ -128,9 +128,10 @@ static DWORD WINAPI audin_alsa_thread_func(LPVOID arg)
|
|||||||
DWORD status = 0;
|
DWORD status = 0;
|
||||||
WLog_Print(alsa->log, WLOG_DEBUG, "in");
|
WLog_Print(alsa->log, WLOG_DEBUG, "in");
|
||||||
|
|
||||||
if ((error = snd_pcm_open(&capture_handle, alsa->device_name, SND_PCM_STREAM_CAPTURE, 0)) < 0)
|
const int rc = snd_pcm_open(&capture_handle, alsa->device_name, SND_PCM_STREAM_CAPTURE, 0);
|
||||||
|
if (rc < 0)
|
||||||
{
|
{
|
||||||
WLog_Print(alsa->log, WLOG_ERROR, "snd_pcm_open (%s)", snd_strerror(error));
|
WLog_Print(alsa->log, WLOG_ERROR, "snd_pcm_open (%s)", snd_strerror(rc));
|
||||||
error = CHANNEL_RC_INITIALIZATION_ERROR;
|
error = CHANNEL_RC_INITIALIZATION_ERROR;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -330,14 +330,10 @@ static BOOL rdpsnd_oss_set_volume(rdpsndDevicePlugin* device, UINT32 value)
|
|||||||
unsigned left = (((value & 0xFFFF) * 100) / 0xFFFF);
|
unsigned left = (((value & 0xFFFF) * 100) / 0xFFFF);
|
||||||
unsigned right = ((((value >> 16) & 0xFFFF) * 100) / 0xFFFF);
|
unsigned right = ((((value >> 16) & 0xFFFF) * 100) / 0xFFFF);
|
||||||
|
|
||||||
if (left < 0)
|
if (left > 100)
|
||||||
left = 0;
|
|
||||||
else if (left > 100)
|
|
||||||
left = 100;
|
left = 100;
|
||||||
|
|
||||||
if (right < 0)
|
if (right > 100)
|
||||||
right = 0;
|
|
||||||
else if (right > 100)
|
|
||||||
right = 100;
|
right = 100;
|
||||||
|
|
||||||
left |= (right << 8);
|
left |= (right << 8);
|
||||||
|
Loading…
Reference in New Issue
Block a user