[all-commits] [llvm/llvm-project] bf6f38: [libc] Fix warnings on release build.

Paula Toth via All-commits all-commits at lists.llvm.org
Thu May 7 11:56:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bf6f3894c4a8f7572e8c45d28d6c5c0fa6101a90
      https://github.com/llvm/llvm-project/commit/bf6f3894c4a8f7572e8c45d28d6c5c0fa6101a90
  Author: Paula Toth <paulatoth at google.com>
  Date:   2020-05-07 (Thu, 07 May 2020)

  Changed paths:
    M libc/utils/benchmarks/LibcMemoryBenchmarkTest.cpp
    M libc/utils/testutils/FDReaderUnix.cpp

  Log Message:
  -----------
  [libc] Fix warnings on release build.

Summary:
These warnings were present when building llvm-libc in release mode.

```
workspace/llvm-project/libc/utils/benchmarks/LibcMemoryBenchmarkTest.cpp:50:34: warning: 'None' is deprecated: Use Align() or Align(1) instead [-Wdeprecated-declarations]
  Conf.AddressAlignment = Align::None();

workspace/llvm-project/libc/utils/testutils/FDReaderUnix.cpp:19:7: warning: unused variable 'err' [-Wunused-variable]
  int err = ::pipe(pipefd);
```

For test-utils it seems in general we should use `report_fatal_error` instead of asserts as these are turned off when building in release mode.
https://llvm.org/docs/CodingStandards.html#assert-liberally

Reviewers: abrachet, sivachandra

Reviewed By: abrachet, sivachandra

Subscribers: tschuett, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D79469




More information about the All-commits mailing list