Skip to content

Commit f7dffa7

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/fmt/format-inl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ 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)) ;
159159
std::fputc('\n', stderr);
160160
}
161161

0 commit comments

Comments
 (0)