summaryrefslogtreecommitdiff
path: root/test/test_guard.pass.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-12-24 00:37:13 +0000
committerEric Fiselier <eric@efcs.ca>2016-12-24 00:37:13 +0000
commit08bf03cf8ca8a4f55644956aec77677b3f0cf232 (patch)
tree896f39c9a0baca1fb5f4710d3a8efcf7f737d100 /test/test_guard.pass.cpp
parent534295b102a7f9951ab2b8b38637b9cdf57cade1 (diff)
Fix warnings in libc++abi tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/test_guard.pass.cpp')
-rw-r--r--test/test_guard.pass.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/test_guard.pass.cpp b/test/test_guard.pass.cpp
index 2312b51..ef86717 100644
--- a/test/test_guard.pass.cpp
+++ b/test/test_guard.pass.cpp
@@ -25,11 +25,12 @@ namespace test1 {
}
void helper() {
static int a = increment();
+ ((void)a);
}
void test() {
- static int a = increment();
+ static int a = increment(); ((void)a);
assert(run_count == 1);
- static int b = increment();
+ static int b = increment(); ((void)b);
assert(run_count == 2);
helper();
assert(run_count == 3);
@@ -50,7 +51,8 @@ namespace test2 {
void helper() {
try {
static int a = increment();
- assert(0);
+ assert(false);
+ ((void)a);
} catch (...) {}
}
void test() {
@@ -71,12 +73,12 @@ namespace test3 {
}
int one() {
- static int b = zero();
+ static int b = zero(); ((void)b);
return 0;
}
void test() {
- static int a = one();
+ static int a = one(); ((void)a);
}
}
@@ -91,7 +93,7 @@ namespace test4 {
}
void helper() {
- static int a = increment();
+ static int a = increment(); ((void)a);
}
void test() {
@@ -112,16 +114,16 @@ namespace test5 {
}
int one() {
- static int b = zero();
+ static int b = zero(); ((void)b);
return 0;
}
void another_helper() {
- static int a = one();
+ static int a = one(); ((void)a);
}
void helper() {
- static int a = one();
+ static int a = one(); ((void)a);
std::thread t(another_helper);
t.join();
}