forked from OSchip/llvm-project
Fix unused variables in tests to placate scan-build. Patch from Steve MacKenzie.
llvm-svn: 220154
This commit is contained in:
parent
afefe97e1c
commit
ac97f7ce7c
|
@ -68,6 +68,7 @@ int main()
|
|||
std::atomic_init(&obj, true);
|
||||
assert(obj == true);
|
||||
bool b0 = obj.is_lock_free();
|
||||
(void)b0; // to placate scan-build
|
||||
obj.store(false);
|
||||
assert(obj == false);
|
||||
obj.store(true, std::memory_order_release);
|
||||
|
@ -123,6 +124,7 @@ int main()
|
|||
std::atomic_init(&obj, true);
|
||||
assert(obj == true);
|
||||
bool b0 = obj.is_lock_free();
|
||||
(void)b0; // to placate scan-build
|
||||
obj.store(false);
|
||||
assert(obj == false);
|
||||
obj.store(true, std::memory_order_release);
|
||||
|
@ -178,6 +180,7 @@ int main()
|
|||
std::atomic_init(&obj, true);
|
||||
assert(obj == true);
|
||||
bool b0 = obj.is_lock_free();
|
||||
(void)b0; // to placate scan-build
|
||||
obj.store(false);
|
||||
assert(obj == false);
|
||||
obj.store(true, std::memory_order_release);
|
||||
|
|
|
@ -71,6 +71,7 @@ int main()
|
|||
assert(next(m.begin(), 5)->second == 2);
|
||||
|
||||
i = m.erase(3);
|
||||
assert(i == 3);
|
||||
assert(m.size() == 3);
|
||||
assert(next(m.begin(), 0)->first == 1);
|
||||
assert(next(m.begin(), 0)->second == 1);
|
||||
|
@ -135,6 +136,7 @@ int main()
|
|||
assert(next(m.begin(), 5)->second == 2);
|
||||
|
||||
i = m.erase(3);
|
||||
assert(i == 3);
|
||||
assert(m.size() == 3);
|
||||
assert(next(m.begin(), 0)->first == 1);
|
||||
assert(next(m.begin(), 0)->second == 1);
|
||||
|
|
|
@ -30,5 +30,6 @@ int main()
|
|||
typedef std::array<T, 0> C;
|
||||
C c = {};
|
||||
T* p = c.data();
|
||||
(void)p; // to placate scan-build
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,5 +30,6 @@ int main()
|
|||
typedef std::array<T, 0> C;
|
||||
const C c = {};
|
||||
const T* p = c.data();
|
||||
(void)p; // to placate scan-build
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,4 +19,5 @@ int main()
|
|||
{
|
||||
std::complex<double> cd;
|
||||
double x = sin(1.0);
|
||||
(void)x; // to placate scan-build
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue