mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DolphinQt: Fix a -Wunused-result in gcc 11
Also use the correct error check for other similar calls in the same file, despite nothing being doable on error.
This commit is contained in:
@ -34,8 +34,9 @@ void SignalDaemon::OnNotifierActivated()
|
|||||||
m_term->setEnabled(false);
|
m_term->setEnabled(false);
|
||||||
|
|
||||||
char tmp;
|
char tmp;
|
||||||
if (read(s_sigterm_fd[1], &tmp, sizeof(char)))
|
if (read(s_sigterm_fd[1], &tmp, sizeof(char)) != sizeof(char))
|
||||||
{
|
{
|
||||||
|
// Not much we can do here.
|
||||||
}
|
}
|
||||||
|
|
||||||
m_term->setEnabled(true);
|
m_term->setEnabled(true);
|
||||||
@ -45,10 +46,14 @@ void SignalDaemon::OnNotifierActivated()
|
|||||||
|
|
||||||
void SignalDaemon::HandleInterrupt(int)
|
void SignalDaemon::HandleInterrupt(int)
|
||||||
{
|
{
|
||||||
write(STDERR_FILENO, message, sizeof(message));
|
if (write(STDERR_FILENO, message, sizeof(message)) != sizeof(message))
|
||||||
|
{
|
||||||
|
// Not much we can do here.
|
||||||
|
}
|
||||||
|
|
||||||
char a = 1;
|
char a = 1;
|
||||||
if (write(s_sigterm_fd[0], &a, sizeof(a)))
|
if (write(s_sigterm_fd[0], &a, sizeof(a)) != sizeof(a))
|
||||||
{
|
{
|
||||||
|
// Not much we can do here.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user