diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2015-09-07 12:33:20 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-09-07 12:33:20 +0100 |
commit | 2d5e3740fdd8a7dd1a91c08532b4cb1df1fcced0 (patch) | |
tree | 756fa4c370c3eebacc6dd3174531851923e59b50 | |
parent | d8356196585c48e3cb4ed837b1e742fa422314e6 (diff) | |
download | gcc-2d5e3740fdd8a7dd1a91c08532b4cb1df1fcced0.zip gcc-2d5e3740fdd8a7dd1a91c08532b4cb1df1fcced0.tar.gz gcc-2d5e3740fdd8a7dd1a91c08532b4cb1df1fcced0.tar.bz2 |
Rename shadowed variable in libstdc++ test.
* testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Rename
shadowed variable.
From-SVN: r227519
-rw-r--r-- | libstdc++-v3/ChangeLog | 3 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 408c798..cbe5a6d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2015-09-07 Jonathan Wakely <jwakely@redhat.com> + * 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 15f9cdf..25093f8 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<std::timed_mutex> 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 ); } |