mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 16:10:06 +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)
|
va_list args)
|
||||||
{
|
{
|
||||||
const char *priority = NULL;
|
const char *priority = NULL;
|
||||||
const char *color = "";
|
const char *color = ""; // NOLINT: deadcode.DeadStores
|
||||||
const char *color_reset = ANSI_NORMAL;
|
const char *color_reset = ANSI_NORMAL;
|
||||||
|
|
||||||
switch (pri) {
|
switch (pri) {
|
||||||
|
|
@ -2409,10 +2409,8 @@ litest_device_destroy(struct litest_device *d)
|
||||||
memset(d, 0, sizeof(*d));
|
memset(d, 0, sizeof(*d));
|
||||||
free(d);
|
free(d);
|
||||||
|
|
||||||
udev_device =
|
udev_device = // NOLINT: deadcode.DeadStores
|
||||||
udev_wait_for_device_event(udev_monitor, // NOLINT: deadcode.DeadStores
|
udev_wait_for_device_event(udev_monitor, "remove", path);
|
||||||
"remove",
|
|
||||||
path);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue