D14686: 'Protect against overloaded comma in random_shuffle and improve tests' I had to cut back on the tests with this, because they were not C++03 friendly. Thanks to gribozavr for the patch

llvm-svn: 352087
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 310256e..b52d445 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -2989,7 +2989,7 @@
     {
         _Dp __uid;
         __rs_default __g = __rs_get();
-        for (--__last, --__d; __first < __last; ++__first, --__d)
+        for (--__last, (void) --__d; __first < __last; ++__first, (void) --__d)
         {
             difference_type __i = __uid(__g, _Pp(0, __d));
             if (__i != difference_type(0))
@@ -3011,7 +3011,7 @@
     difference_type __d = __last - __first;
     if (__d > 1)
     {
-        for (--__last; __first < __last; ++__first, --__d)
+        for (--__last; __first < __last; ++__first, (void) --__d)
         {
             difference_type __i = __rand(__d);
             if (__i != difference_type(0))