[compiler-rt] Suppress -Wunused-result due to ::write when _FORTIFY_SOURCE>0 in glibc
Noticed by Peter Foley.
In glibc, ::write is declared as __attribute__((__warn_unused_result__)) when __USE_FORTIFY_LEVEL is larger than 0.
GitOrigin-RevId: 1ef0e94d5b0206f69e4e822c6828d0b5121c11fb
diff --git a/linux.cpp b/linux.cpp
index 69ffdd9..12f3da6 100644
--- a/linux.cpp
+++ b/linux.cpp
@@ -198,7 +198,7 @@
}
async_safe_write_log(AndroidLogInfo, "scudo", Buffer);
} else {
- write(2, Buffer, strlen(Buffer));
+ (void)write(2, Buffer, strlen(Buffer));
}
}