Resolve compiler warnings for unused return values
* Fixes #1932 - See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425#c29 Adding a negation before the function call allows the (void) syntax to work properly.
This commit is contained in:
@@ -256,7 +256,7 @@ void Application::handleUnixSignal(int sig)
|
||||
case SIGINT:
|
||||
case SIGTERM: {
|
||||
char buf = 0;
|
||||
Q_UNUSED(::write(unixSignalSocket[0], &buf, sizeof(buf)));
|
||||
Q_UNUSED(!::write(unixSignalSocket[0], &buf, sizeof(buf)));
|
||||
return;
|
||||
}
|
||||
case SIGHUP:
|
||||
@@ -268,7 +268,7 @@ void Application::quitBySignal()
|
||||
{
|
||||
m_unixSignalNotifier->setEnabled(false);
|
||||
char buf;
|
||||
Q_UNUSED(::read(unixSignalSocket[1], &buf, sizeof(buf)));
|
||||
Q_UNUSED(!::read(unixSignalSocket[1], &buf, sizeof(buf)));
|
||||
emit quitSignalReceived();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user