Skip to content

Explicit handle ignoring the return code for failed error messages #3045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions judge/runguard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ void verbose(const char *format, ...)
void verbose_from_signalhandler(const char* msg)
{
if (!be_quiet && be_verbose) {
write(STDERR_FILENO, msg, strlen(msg));
std::ignore = write(STDERR_FILENO, msg, strlen(msg));
}
}

Expand All @@ -242,7 +242,7 @@ void warning_from_signalhandler(const char* msg)
if (!be_quiet) {
// Do not include timing here, as it wouldn't be safe from a signalhandler.
// TODO: Consider rewriting using clock_gettime in the future.
write(STDERR_FILENO, msg, strlen(msg));
std::ignore = write(STDERR_FILENO, msg, strlen(msg));
}
}

Expand Down
Loading