tst_QProcess: silence -Wunused-result
We can't do anything about a failed write at these code locations. In particular, we can't QVERIFY() their success, so suppress the warning with the idiomatic cast to void. Amendsbb1013a1995e9d,bd32c7d705andc5221f6be0. Pick-to: 6.7 Change-Id: Ia7ef57f01eeb8608079a12724c0b4f03a59081c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 97f31a68795e1d492f98a9942cce5228cbe64cf8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
parent
beabc63598
commit
34ac282a1e
|
|
@ -1715,7 +1715,7 @@ void tst_QProcess::raiseInChildProcessModifier()
|
|||
sa.sa_flags = SA_RESETHAND;
|
||||
sa.sa_handler = [](int) {
|
||||
static const char msg[] = "SIGUSR1 handler was run";
|
||||
write(STDERR_FILENO, msg, strlen(msg));
|
||||
(void)write(STDERR_FILENO, msg, strlen(msg));
|
||||
raise(SIGUSR1); // re-raise
|
||||
};
|
||||
sigaction(SIGUSR1, &sa, nullptr);
|
||||
|
|
@ -1897,8 +1897,8 @@ void tst_QProcess::unixProcessParametersAndChildModifier()
|
|||
process.setChildProcessModifier([=, &vforkControl] {
|
||||
const char *pgidmsg = "PGID mismatch. ";
|
||||
if (getpgrp() != oldpgid)
|
||||
write(pipes[1], pgidmsg, strlen(pgidmsg));
|
||||
write(pipes[1], message, strlen(message));
|
||||
(void)write(pipes[1], pgidmsg, strlen(pgidmsg));
|
||||
(void)write(pipes[1], message, strlen(message));
|
||||
vforkControl.storeRelaxed(1);
|
||||
});
|
||||
auto flags = QProcess::UnixProcessFlag::CloseFileDescriptors |
|
||||
|
|
|
|||
Loading…
Reference in New Issue