Skip to content

Commit a636a16

Browse files
committed
Explicit ignore the return code for failed error messages
This gave a compiler warning. We only use the function in case something is already wrong so signalling further that the error failed doesn't help us anymore.
1 parent e81837d commit a636a16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

judge/runguard.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void verbose(const char *format, ...)
233233
void verbose_from_signalhandler(const char* msg)
234234
{
235235
if (!be_quiet && be_verbose) {
236-
write(STDERR_FILENO, msg, strlen(msg));
236+
std::ignore = write(STDERR_FILENO, msg, strlen(msg));
237237
}
238238
}
239239

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

0 commit comments

Comments
 (0)