[libcxx-commits] [PATCH] D103533: [libc++] Remove unused variable

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 2 13:30:49 PDT 2021


ldionne updated this revision to Diff 349363.
ldionne added a comment.

Fix issues in <random> tests


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103533

Files:
  libcxx/include/regex
  libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
  libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp


Index: libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
===================================================================
--- libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
+++ libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
@@ -177,8 +177,8 @@
     double mean = std::accumulate(u.begin(), u.end(),
                                           double(0)) / u.size();
     double var = 0;
-    double skew = 0;
-    double kurtosis = 0;
+    // double skew = 0;
+    // double kurtosis = 0;
     for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
Index: libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
===================================================================
--- libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
+++ libcxx/test/std/numerics/rand/rand.dis/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
@@ -177,8 +177,8 @@
     double mean = std::accumulate(u.begin(), u.end(),
                                           double(0)) / u.size();
     double var = 0;
-    double skew = 0;
-    double kurtosis = 0;
+    // double skew = 0;
+    // double kurtosis = 0;
     for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
@@ -226,8 +226,8 @@
     double mean = std::accumulate(u.begin(), u.end(),
                                           double(0)) / u.size();
     double var = 0;
-    double skew = 0;
-    double kurtosis = 0;
+    // double skew = 0;
+    // double kurtosis = 0;
     for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
@@ -379,8 +379,8 @@
     double mean = std::accumulate(u.begin(), u.end(),
                                           double(0)) / u.size();
     double var = 0;
-    double skew = 0;
-    double kurtosis = 0;
+    // double skew = 0;
+    // double kurtosis = 0;
     for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
@@ -428,8 +428,8 @@
     double mean = std::accumulate(u.begin(), u.end(),
                                           double(0)) / u.size();
     double var = 0;
-    double skew = 0;
-    double kurtosis = 0;
+    // double skew = 0;
+    // double kurtosis = 0;
     for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
@@ -477,8 +477,8 @@
     double mean = std::accumulate(u.begin(), u.end(),
                                           double(0)) / u.size();
     double var = 0;
-    double skew = 0;
-    double kurtosis = 0;
+    // double skew = 0;
+    // double kurtosis = 0;
     for (unsigned i = 0; i < u.size(); ++i)
     {
         double dbl = (u[i] - mean);
Index: libcxx/include/regex
===================================================================
--- libcxx/include/regex
+++ libcxx/include/regex
@@ -5884,7 +5884,6 @@
 {
     vector<__state> __states;
     __state __best_state;
-    ptrdiff_t __j = 0;
     ptrdiff_t __highest_j = 0;
     ptrdiff_t _Np = _VSTD::distance(__first, __last);
     __node* __st = __start_.get();
@@ -5945,7 +5944,6 @@
                     __states.pop_back();
                 break;
             case __state::__accept_and_consume:
-                __j += __s.__current_ - __current;
                 __current = __s.__current_;
                 break;
             case __state::__repeat:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103533.349363.patch
Type: text/x-patch
Size: 3486 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210602/1b9cc24e/attachment-0001.bin>


More information about the libcxx-commits mailing list