From 08bf03cf8ca8a4f55644956aec77677b3f0cf232 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sat, 24 Dec 2016 00:37:13 +0000 Subject: Fix warnings in libc++abi tests git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@290471 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/test_guard.pass.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'test/test_guard.pass.cpp') 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(); } -- cgit v1.2.3