[libcxx-commits] [libcxx] r364732 - [libcxx] [test] Add void cast to result of compare_exchange_weak to suppress [[nodiscard]].
Billy Robert O'Neal III via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 1 01:09:03 PDT 2019
Author: bion
Date: Mon Jul 1 01:09:02 2019
New Revision: 364732
URL: http://llvm.org/viewvc/llvm-project?rev=364732&view=rev
Log:
[libcxx] [test] Add void cast to result of compare_exchange_weak to suppress [[nodiscard]].
Modified:
libcxx/trunk/test/std/atomics/atomics.general/replace_failure_order.pass.cpp
Modified: libcxx/trunk/test/std/atomics/atomics.general/replace_failure_order.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/atomics/atomics.general/replace_failure_order.pass.cpp?rev=364732&r1=364731&r2=364732&view=diff
==============================================================================
--- libcxx/trunk/test/std/atomics/atomics.general/replace_failure_order.pass.cpp (original)
+++ libcxx/trunk/test/std/atomics/atomics.general/replace_failure_order.pass.cpp Mon Jul 1 01:09:02 2019
@@ -30,13 +30,13 @@ int main(int, char**) {
volatile std::atomic<int> v;
int exp = 0;
- i.compare_exchange_weak(exp, 0, std::memory_order_acq_rel);
- i.compare_exchange_weak(exp, 0, std::memory_order_release);
+ (void) i.compare_exchange_weak(exp, 0, std::memory_order_acq_rel);
+ (void) i.compare_exchange_weak(exp, 0, std::memory_order_release);
i.compare_exchange_strong(exp, 0, std::memory_order_acq_rel);
i.compare_exchange_strong(exp, 0, std::memory_order_release);
- v.compare_exchange_weak(exp, 0, std::memory_order_acq_rel);
- v.compare_exchange_weak(exp, 0, std::memory_order_release);
+ (void) v.compare_exchange_weak(exp, 0, std::memory_order_acq_rel);
+ (void) v.compare_exchange_weak(exp, 0, std::memory_order_release);
v.compare_exchange_strong(exp, 0, std::memory_order_acq_rel);
v.compare_exchange_strong(exp, 0, std::memory_order_release);
More information about the libcxx-commits
mailing list