[libc-commits] [PATCH] D125939: [libc] add fprintf and file_writer
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu May 19 13:33:01 PDT 2022
michaelrj added inline comments.
================
Comment at: libc/src/stdio/printf_core/file_writer.h:23
+ __llvm_libc::File *file = reinterpret_cast<__llvm_libc::File *>(raw_pointer);
+ file->write(to_write, len);
+}
----------------
sivachandra wrote:
> Is it OK to ignore the return value? For example, if `file` were read only, then `write` would fail. Shouldn't that be reflected in the `fprintf` return value?
I've added a check of the file's `ferror` status in fprintf and a section of the test to check that it works.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125939/new/
https://reviews.llvm.org/D125939
More information about the libc-commits
mailing list