From 24db6e467a6560126c5e718e40735c62362d3246 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 17 May 2021 21:59:44 +0200 Subject: [PATCH] =?UTF-8?q?DolphinQt:=20Fix=20a=20-Wunused-result=20in=20g?= =?UTF-8?q?cc=C2=A011?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also use the correct error check for other similar calls in the same file, despite nothing being doable on error. --- Source/Core/DolphinQt/QtUtils/SignalDaemon.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt/QtUtils/SignalDaemon.cpp b/Source/Core/DolphinQt/QtUtils/SignalDaemon.cpp index efda873412..c3e6039ccc 100644 --- a/Source/Core/DolphinQt/QtUtils/SignalDaemon.cpp +++ b/Source/Core/DolphinQt/QtUtils/SignalDaemon.cpp @@ -34,8 +34,9 @@ void SignalDaemon::OnNotifierActivated() m_term->setEnabled(false); 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); @@ -45,10 +46,14 @@ void SignalDaemon::OnNotifierActivated() 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; - 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. } }