[NFC][libc++] Suppress "warning: ignoring return value"
authorVitaly Buka <vitalybuka@google.com>
Fri, 26 Feb 2021 22:29:06 +0000 (14:29 -0800)
committerVitaly Buka <vitalybuka@google.com>
Fri, 26 Feb 2021 22:32:54 +0000 (14:32 -0800)
According to the comment on the next line
it's expected behaviour.

libcxx/include/new

index 0562cef..21bc30b 100644 (file)
@@ -314,7 +314,7 @@ void* __libcpp_aligned_alloc(std::size_t __alignment, std::size_t __size) {
   return ::_aligned_malloc(__size, __alignment);
 #else
   void* __result = nullptr;
-  ::posix_memalign(&__result, __alignment, __size);
+  (void)::posix_memalign(&__result, __alignment, __size);
   // If posix_memalign fails, __result is unmodified so we still return `nullptr`.
   return __result;
 #endif