mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 1005784 - Fix -Wuninitialized warnings in webrtc/modules/audio_device/linux/. r=jesup
This commit is contained in:
parent
870a7e05b3
commit
b65637a65e
@ -2369,18 +2369,16 @@ bool AudioDeviceLinuxALSA::RecThreadProcess()
|
||||
|
||||
|
||||
bool AudioDeviceLinuxALSA::KeyPressed() const{
|
||||
|
||||
#ifdef USE_X11
|
||||
char szKey[32];
|
||||
unsigned int i = 0;
|
||||
char state = 0;
|
||||
|
||||
#ifdef USE_X11
|
||||
if (!_XDisplay)
|
||||
return false;
|
||||
|
||||
// Check key map status
|
||||
XQueryKeymap(_XDisplay, szKey);
|
||||
#endif
|
||||
|
||||
// A bit change in keymap means a key is pressed
|
||||
for (i = 0; i < sizeof(szKey); i++)
|
||||
@ -2389,5 +2387,8 @@ bool AudioDeviceLinuxALSA::KeyPressed() const{
|
||||
// Save old state
|
||||
memcpy((char*)_oldKeyState, (char*)szKey, sizeof(_oldKeyState));
|
||||
return (state != 0);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
} // namespace webrtc
|
||||
|
@ -3114,18 +3114,16 @@ bool AudioDeviceLinuxPulse::RecThreadProcess()
|
||||
}
|
||||
|
||||
bool AudioDeviceLinuxPulse::KeyPressed() const{
|
||||
|
||||
#ifdef USE_X11
|
||||
char szKey[32];
|
||||
unsigned int i = 0;
|
||||
char state = 0;
|
||||
|
||||
#ifdef USE_X11
|
||||
if (!_XDisplay)
|
||||
return false;
|
||||
|
||||
// Check key map status
|
||||
XQueryKeymap(_XDisplay, szKey);
|
||||
#endif
|
||||
|
||||
// A bit change in keymap means a key is pressed
|
||||
for (i = 0; i < sizeof(szKey); i++)
|
||||
@ -3134,5 +3132,8 @@ bool AudioDeviceLinuxPulse::KeyPressed() const{
|
||||
// Save old state
|
||||
memcpy((char*)_oldKeyState, (char*)szKey, sizeof(_oldKeyState));
|
||||
return (state != 0);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user