mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-21 21:30:36 +01:00
evdev: Fix uninitialized variable
Due to a patch pushed accidentally to main, the `key_count` variable is
uninitialized in the `evdev_log_bug_libinput` code path:
../src/evdev.c:148:12: error: ‘key_count’ may be used uninitialized [-Werror=maybe-uninitialized]
148 | if (key_count > 32) {
| ^
../src/evdev.c: In function ‘evdev_pointer_post_button’:
../src/evdev.c:132:13: note: ‘key_count’ was declared here
132 | int key_count;
| ^~~~~~~~~
Fixes commit bb1e4a493f ("evdev: Log bug when releasing key with count 0")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
parent
bb1e4a493f
commit
bf59231f23
1 changed files with 1 additions and 1 deletions
|
|
@ -129,7 +129,7 @@ evdev_update_key_down_count(struct evdev_device *device,
|
|||
int code,
|
||||
int pressed)
|
||||
{
|
||||
int key_count;
|
||||
int key_count = 0;
|
||||
assert(code >= 0 && code < KEY_CNT);
|
||||
|
||||
if (pressed) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue