Skip to content

Commit 699746b

Browse files
committed
"Use" fwrite result (workaround for warn_unused_result)
Fixes #2185
1 parent 6151d0d commit 699746b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/fmt/format-inl.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ FMT_FUNC void report_error(format_func func, int error_code,
155155
memory_buffer full_message;
156156
func(full_message, error_code, message);
157157
// Don't use fwrite_fully because the latter may throw.
158-
(void)std::fwrite(full_message.data(), full_message.size(), 1, stderr);
158+
if (std::fwrite(full_message.data(), full_message.size(), 1, stderr)) {
159+
;
160+
}
159161
std::fputc('\n', stderr);
160162
}
161163

0 commit comments

Comments
 (0)