]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-input-device: Fix 'may be used uninitialized' warnings
authorn3rdopolis <bluescreenavenger@gmail.com>
Fri, 5 Jan 2024 15:42:39 +0000 (15:42 +0000)
committerRay Strode <halfline@gmail.com>
Fri, 5 Jan 2024 15:42:39 +0000 (15:42 +0000)
If libevdev gave plymouth an event with an out of range key event type then plymouth would end up using uninitialized variables.

This commit fixes the compiler warning introduced from that unlikely scenario.

src/libply-splash-core/ply-input-device.c

index 2e8a5a9006a98fadaead6f958c573217d55d8656..643ac34a7f1f6704c7e3fd0322568b6080991ec7 100644 (file)
@@ -240,6 +240,8 @@ on_input (ply_input_device_t *input_device)
                         key_state = PLY_KEY_HELD;
                         xkb_key_direction = XKB_KEY_UP;
                         break;
+                default:
+                        continue;
                 }
 
                 /* According to