Browse Source

Fixed compile warning [-Wunused-variable] in src/allocator.cpp for linux-gcc-nostdio-nostring build. (#2455)

tags/20201218
Evgeny Proydakov GitHub 5 years ago
parent
commit
80cd5f3ed5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/allocator.cpp

+ 4
- 0
src/allocator.cpp View File

@@ -39,12 +39,14 @@ PoolAllocator::~PoolAllocator()
if (!payouts.empty())
{
NCNN_LOGE("FATAL ERROR! pool allocator destroyed too early");
#if NCNN_STDIO
std::list<std::pair<size_t, void*> >::iterator it = payouts.begin();
for (; it != payouts.end(); ++it)
{
void* ptr = it->second;
NCNN_LOGE("%p still in use", ptr);
}
#endif
}
}

@@ -161,12 +163,14 @@ UnlockedPoolAllocator::~UnlockedPoolAllocator()
if (!payouts.empty())
{
NCNN_LOGE("FATAL ERROR! unlocked pool allocator destroyed too early");
#if NCNN_STDIO
std::list<std::pair<size_t, void*> >::iterator it = payouts.begin();
for (; it != payouts.end(); ++it)
{
void* ptr = it->second;
NCNN_LOGE("%p still in use", ptr);
}
#endif
}
}



Loading…
Cancel
Save