From d59cff752d46842a7ce82ea89f1ea2ad46a72eb3 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 19 Jan 2015 10:53:45 +0100 Subject: [PATCH] base_cpp: removed cppcheck warnings --- base_cpp/test/atomic_test.cc | 2 -- base_cpp/test/mutex_test.cc | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/base_cpp/test/atomic_test.cc b/base_cpp/test/atomic_test.cc index 156dca4..6ce9e25 100644 --- a/base_cpp/test/atomic_test.cc +++ b/base_cpp/test/atomic_test.cc @@ -346,8 +346,6 @@ void AtomicTest::BasicTests() { //Boolean operations... // And i = 0; - i &= 0; - PT_EXPECT(i == 0); i &= 1; PT_EXPECT(i == 0); i = 1; diff --git a/base_cpp/test/mutex_test.cc b/base_cpp/test/mutex_test.cc index 879ff6a..5b3be62 100644 --- a/base_cpp/test/mutex_test.cc +++ b/base_cpp/test/mutex_test.cc @@ -93,10 +93,10 @@ void MutexTest::PostLockGuardCount() { } void MutexTest::TestUniqueLock() { + { // Test standard usage and releasing #ifdef EMBB_USE_EXCEPTIONS - bool exception_thrown = false; + bool exception_thrown = false; #endif - { // Test standard usage and releasing UniqueLock lock(mutex_); PT_EXPECT_EQ(lock.OwnsLock(), true); -- libgit2 0.26.0