about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2024-03-15 16:48:16 -0700
committerJosh Stone <jistone@redhat.com>2024-03-15 16:48:16 -0700
commitadf57a75d5014b620f2c09587b6e1e108a7622da (patch)
tree410a5522fa31186d82055d0c66cc7b2dcf102e2d /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent0ade5a11f5705e33e031ae5b47c21fd0553d6675 (diff)
downloadrust-adf57a75d5014b620f2c09587b6e1e108a7622da.tar.gz
rust-adf57a75d5014b620f2c09587b6e1e108a7622da.zip
Aggressively ignore write errors during bad-alloc
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 072620c65a5..861c0a6e79a 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -103,9 +103,9 @@ static void BadAllocErrorHandler(void *UserData,
                                  const char* Reason,
                                  bool GenCrashDiag) {
   const char *OOM = "rustc-LLVM ERROR: out of memory\n";
-  write(2, OOM, strlen(OOM));
-  write(2, Reason, strlen(Reason));
-  write(2, "\n", 1);
+  (void)!::write(2, OOM, strlen(OOM));
+  (void)!::write(2, Reason, strlen(Reason));
+  (void)!::write(2, "\n", 1);
   abort();
 }