mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 06:50:05 +01:00
test: fix two clang-tidy dead store complaints
udev_device isn't used but we assign it for being auto-freed. And color is overwritten immediately but it's better to have a known good value for it anyway. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1292>
This commit is contained in:
parent
a102269364
commit
4ef50ee946
1 changed files with 3 additions and 5 deletions
|
|
@ -1311,7 +1311,7 @@ litest_log_handler(struct libinput *libinput,
|
|||
va_list args)
|
||||
{
|
||||
const char *priority = NULL;
|
||||
const char *color = "";
|
||||
const char *color = ""; // NOLINT: deadcode.DeadStores
|
||||
const char *color_reset = ANSI_NORMAL;
|
||||
|
||||
switch (pri) {
|
||||
|
|
@ -2409,10 +2409,8 @@ litest_device_destroy(struct litest_device *d)
|
|||
memset(d, 0, sizeof(*d));
|
||||
free(d);
|
||||
|
||||
udev_device =
|
||||
udev_wait_for_device_event(udev_monitor, // NOLINT: deadcode.DeadStores
|
||||
"remove",
|
||||
path);
|
||||
udev_device = // NOLINT: deadcode.DeadStores
|
||||
udev_wait_for_device_event(udev_monitor, "remove", path);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue