mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Fix -Wunused-result warnings
This commit is contained in:
parent
df76f2910b
commit
68156a02ed
@ -290,6 +290,17 @@ static BOOL WINAPI s_ctrl_handler(DWORD fdwCtrlType)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__unix__) || defined(__unix) || defined(__APPLE__)
|
||||||
|
static void SignalHandler(int)
|
||||||
|
{
|
||||||
|
const char message[] = "A signal was received. A second signal will force Dolphin to stop.\n";
|
||||||
|
if (write(STDERR_FILENO, message, sizeof(message)) < 0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
s_shutdown_signal_received.Set();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geometry,
|
CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geometry,
|
||||||
bool use_debugger, bool batch_mode, bool show_log_window, long style)
|
bool use_debugger, bool batch_mode, bool show_log_window, long style)
|
||||||
: CRenderFrame(parent, id, title, wxDefaultPosition, wxSize(800, 600), style),
|
: CRenderFrame(parent, id, title, wxDefaultPosition, wxSize(800, 600), style),
|
||||||
@ -445,11 +456,7 @@ CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geo
|
|||||||
|
|
||||||
#if defined(__unix__) || defined(__unix) || defined(__APPLE__)
|
#if defined(__unix__) || defined(__unix) || defined(__APPLE__)
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
sa.sa_handler = [](int unused) {
|
sa.sa_handler = SignalHandler;
|
||||||
char message[] = "A signal was received. A second signal will force Dolphin to stop.\n";
|
|
||||||
write(STDERR_FILENO, message, sizeof(message));
|
|
||||||
s_shutdown_signal_received.Set();
|
|
||||||
};
|
|
||||||
sigemptyset(&sa.sa_mask);
|
sigemptyset(&sa.sa_mask);
|
||||||
sa.sa_flags = SA_RESETHAND;
|
sa.sa_flags = SA_RESETHAND;
|
||||||
sigaction(SIGINT, &sa, nullptr);
|
sigaction(SIGINT, &sa, nullptr);
|
||||||
|
@ -131,7 +131,9 @@ static void StopHotplugThread()
|
|||||||
{
|
{
|
||||||
// Write something to efd so that select() stops blocking.
|
// Write something to efd so that select() stops blocking.
|
||||||
uint64_t value = 1;
|
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();
|
s_hotplug_thread.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -404,7 +406,9 @@ void evdevDevice::ForceFeedback::SetState(ControlState state)
|
|||||||
play.code = m_id;
|
play.code = m_id;
|
||||||
play.value = 1;
|
play.value = 1;
|
||||||
|
|
||||||
write(m_fd, (const void*)&play, sizeof(play));
|
if (write(m_fd, &play, sizeof(play)) < 0)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user