mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1005784 - Fix -Wuninitialized warnings in webrtc/modules/audio_device/linux/. r=jesup
This commit is contained in:
parent
ede204a24f
commit
9bc8912ff4
@ -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