clean up unused usages (#421)

* clean up unused usages

Signed-off-by: SchrodingerZhu <i@zhuyi.fan>

* remove names for arg pack

Signed-off-by: SchrodingerZhu <i@zhuyi.fan>

* fix namespace in setup.h

Signed-off-by: SchrodingerZhu <i@zhuyi.fan>

* format

Signed-off-by: SchrodingerZhu <i@zhuyi.fan>

* set UNUSED as fast path

Signed-off-by: SchrodingerZhu <i@zhuyi.fan>
This commit is contained in:
Schrodinger ZHU Yifan
2021-11-19 21:23:39 +08:00
committed by GitHub
parent f731bc169b
commit 8e5514bd5a
14 changed files with 23 additions and 41 deletions

View File

@@ -35,8 +35,7 @@ void test_clz()
int main(int argc, char** argv)
{
UNUSED(argc);
UNUSED(argv);
snmalloc::UNUSED(argc, argv);
setup();

View File

@@ -27,8 +27,7 @@ using namespace snmalloc;
void test_limited(rlim64_t as_limit, size_t& count)
{
UNUSED(as_limit);
UNUSED(count);
UNUSED(as_limit, count);
#if false && defined(TEST_LIMITED)
auto pid = fork();
if (!pid)
@@ -490,8 +489,7 @@ int main(int argc, char** argv)
size_t seed = opt.is<size_t>("--seed", 0);
Virtual::systematic_bump_ptr() += seed << 17;
#else
UNUSED(argc);
UNUSED(argv);
UNUSED(argc, argv);
#endif
test_alloc_dealloc_64k();
test_random_allocation();

View File

@@ -120,8 +120,7 @@ void test_pagemap(bool bounded)
int main(int argc, char** argv)
{
UNUSED(argc);
UNUSED(argv);
UNUSED(argc, argv);
setup();

View File

@@ -124,8 +124,7 @@ int main(int argc, char** argv)
size_t seed = opt.is<size_t>("--seed", 0);
Virtual::systematic_bump_ptr() += seed << 17;
#else
UNUSED(argc);
UNUSED(argv);
UNUSED(argc, argv);
#endif
test_alloc();

View File

@@ -7,14 +7,13 @@
extern "C" void* oe_memset_s(void* p, size_t p_size, int c, size_t size)
{
UNUSED(p_size);
snmalloc::UNUSED(p_size);
return memset(p, c, size);
}
extern "C" int oe_random(void* p, size_t p_size)
{
UNUSED(p_size);
UNUSED(p);
snmalloc::UNUSED(p_size, p);
// Stub for random data.
return 0;
}