From: Jonathan Wakely Date: Mon, 7 Sep 2015 11:33:20 +0000 (+0100) Subject: Rename shadowed variable in libstdc++ test. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d5e3740fdd8a7dd1a91c08532b4cb1df1fcced0;p=gcc.git Rename shadowed variable in libstdc++ test. * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Rename shadowed variable. From-SVN: r227519 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 408c798a3f2..cbe5a6d729f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2015-09-07 Jonathan Wakely + * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Rename + shadowed variable. + * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Run on darwin. * testsuite/30_threads/timed_mutex/unlock/2.cc: Run on darwin. diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc index 15f9cdf4ddc..25093f8d1bd 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc @@ -48,21 +48,21 @@ struct clock }; std::timed_mutex mx; -bool test = false; +bool locked = false; void f() { - test = mx.try_lock_until(clock::now() + C::milliseconds(1)); + locked = mx.try_lock_until(clock::now() + C::milliseconds(1)); } int main() { - bool test = false; + bool test __attribute__((unused)) = true; std::lock_guard l(mx); auto start = C::system_clock::now(); std::thread t(f); t.join(); auto stop = C::system_clock::now(); VERIFY( (stop - start) < C::seconds(9) ); - VERIFY( !test ); + VERIFY( !locked ); }