Skip to content

Commit

Permalink
"Use" fwrite result (workaround for warn_unused_result)
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyDonahue committed Mar 20, 2021
1 parent 6151d0d commit 699746b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/fmt/format-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ FMT_FUNC void report_error(format_func func, int error_code,
memory_buffer full_message;
func(full_message, error_code, message);
// Don't use fwrite_fully because the latter may throw.
(void)std::fwrite(full_message.data(), full_message.size(), 1, stderr);
if (std::fwrite(full_message.data(), full_message.size(), 1, stderr)) {
;
}
std::fputc('\n', stderr);
}

Expand Down

0 comments on commit 699746b

Please sign in to comment.