Some versions of gcc still warn about "ignoring return value ... declared

with attribute warn_unused_result" here - suppress the warning harder.

llvm-svn: 114072
This commit is contained in:
Duncan Sands 2010-09-16 08:20:49 +00:00
parent f4ee1ddfa2
commit c8ba8d2085
1 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,8 @@ void llvm::report_fatal_error(const Twine &Reason) {
raw_svector_ostream OS(Buffer);
OS << "LLVM ERROR: " << Reason << "\n";
StringRef MessageStr = OS.str();
(void)::write(2, MessageStr.data(), MessageStr.size());
ssize_t written = ::write(2, MessageStr.data(), MessageStr.size());
(void)written; // If something went wrong, we deliberately just give up.
}
// If we reached here, we are failing ungracefully. Run the interrupt handlers