Fix -Wunused-result warnings

This commit is contained in:
Léo Lam
2016-10-22 19:08:17 +02:00
parent df76f2910b
commit 68156a02ed
2 changed files with 18 additions and 7 deletions

View File

@ -131,7 +131,9 @@ static void StopHotplugThread()
{
// Write something to efd so that select() stops blocking.
uint64_t value = 1;
write(s_wakeup_eventfd, &value, sizeof(uint64_t));
if (write(s_wakeup_eventfd, &value, sizeof(uint64_t)) < 0)
{
}
s_hotplug_thread.join();
}
}
@ -404,7 +406,9 @@ void evdevDevice::ForceFeedback::SetState(ControlState state)
play.code = m_id;
play.value = 1;
write(m_fd, (const void*)&play, sizeof(play));
if (write(m_fd, &play, sizeof(play)) < 0)
{
}
}
}