diff options
| author | Dentomologist <dentomologist@gmail.com> | 2021-03-04 08:09:49 -0800 |
|---|---|---|
| committer | Dentomologist <dentomologist@gmail.com> | 2021-03-07 10:10:02 -0800 |
| commit | 1fd332d3b7950a5c59cc0eb34885904a308546e2 (patch) | |
| tree | da18a942b650a6167ca28fad60736fee33b43154 /Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp | |
| parent | 7ff8e3367f6f1d09548280b282b0240d9781a37c (diff) | |
ControllerInterface: Fix unused-result warning
Add ! before unused variables to 'use' them.
Ubuntu-x64 emits warnings for unused variables because gcc decides
it should ignore the void cast around them. See thread for discussion:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp index 61b6a1e46b..214dd323ac 100644 --- a/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp +++ b/Source/Core/InputCommon/ControllerInterface/evdev/evdev.cpp @@ -365,7 +365,7 @@ static void StopHotplugThread() // Write something to efd so that select() stops blocking. const uint64_t value = 1; - static_cast<void>(write(s_wakeup_eventfd, &value, sizeof(uint64_t))); + static_cast<void>(!write(s_wakeup_eventfd, &value, sizeof(uint64_t))); s_hotplug_thread.join(); close(s_wakeup_eventfd); @@ -525,7 +525,7 @@ bool evdevDevice::AddNode(std::string devnode, int fd, libevdev* dev) ie.code = FF_AUTOCENTER; ie.value = 0; - static_cast<void>(write(fd, &ie, sizeof(ie))); + static_cast<void>(!write(fd, &ie, sizeof(ie))); } // Constant FF effect @@ -725,7 +725,7 @@ void evdevDevice::Effect::UpdateEffect() play.code = m_effect.id; play.value = 1; - static_cast<void>(write(m_fd, &play, sizeof(play))); + static_cast<void>(!write(m_fd, &play, sizeof(play))); } else { |
