[libcxx-commits] [PATCH] D156613: [libc++] Fix minor warnings in libcxx benchmarks

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 13 14:07:53 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG3df9c2984b4e: [libc++] Fix minor warnings in libcxx benchmarks (authored by ilvokhin, committed by ldionne).
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156613

Files:
  libcxx/benchmarks/allocation.bench.cpp
  libcxx/benchmarks/monotonic_buffer.bench.cpp


Index: libcxx/benchmarks/monotonic_buffer.bench.cpp
===================================================================
--- libcxx/benchmarks/monotonic_buffer.bench.cpp
+++ libcxx/benchmarks/monotonic_buffer.bench.cpp
@@ -16,7 +16,7 @@
   std::pmr::monotonic_buffer_resource resource(buffer, sizeof(buffer));
   for (auto _ : state) {
     std::pmr::list<int> l(&resource);
-    for (size_t i = 0; i != state.range(); ++i) {
+    for (int64_t i = 0; i != state.range(); ++i) {
       l.push_back(1);
       benchmark::DoNotOptimize(l);
     }
Index: libcxx/benchmarks/allocation.bench.cpp
===================================================================
--- libcxx/benchmarks/allocation.bench.cpp
+++ libcxx/benchmarks/allocation.bench.cpp
@@ -76,8 +76,8 @@
     p = AllocWrapper::Allocate(alloc_size);
   }
 
-  void** Data      = Pointers.data();
-  void** const End = Pointers.data() + Pointers.size();
+  void** Data                       = Pointers.data();
+  [[maybe_unused]] void** const End = Pointers.data() + Pointers.size();
   while (st.KeepRunning()) {
     AllocWrapper::Deallocate(*Data, alloc_size);
     Data += 1;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156613.556721.patch
Type: text/x-patch
Size: 1135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230913/f01514a3/attachment.bin>


More information about the libcxx-commits mailing list