[libc-commits] [PATCH] D79469: [libc] Fix warnings on release build.

Paula Toth via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed May 6 01:34:56 PDT 2020


PaulkaToast updated this revision to Diff 262313.
PaulkaToast marked 2 inline comments as done.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79469/new/

https://reviews.llvm.org/D79469

Files:
  libc/utils/benchmarks/LibcMemoryBenchmarkTest.cpp
  libc/utils/testutils/FDReaderUnix.cpp


Index: libc/utils/testutils/FDReaderUnix.cpp
===================================================================
--- libc/utils/testutils/FDReaderUnix.cpp
+++ libc/utils/testutils/FDReaderUnix.cpp
@@ -16,8 +16,8 @@
 namespace testutils {
 
 FDReader::FDReader() {
-  int err = ::pipe(pipefd);
-  assert(!err && "pipe(2) failed");
+  if (::pipe(pipefd))
+    llvm::report_fatal_error("pipe(2) failed");
 }
 
 FDReader::~FDReader() {
Index: libc/utils/benchmarks/LibcMemoryBenchmarkTest.cpp
===================================================================
--- libc/utils/benchmarks/LibcMemoryBenchmarkTest.cpp
+++ libc/utils/benchmarks/LibcMemoryBenchmarkTest.cpp
@@ -47,7 +47,6 @@
 TEST(OffsetDistribution, NoAlignment) {
   StudyConfiguration Conf;
   Conf.BufferSize = 8192;
-  Conf.AddressAlignment = Align::None();
   Conf.Size.To = 1;
 
   OffsetDistribution OD(Conf);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79469.262313.patch
Type: text/x-patch
Size: 876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200506/384d7f22/attachment-0001.bin>


More information about the libc-commits mailing list