Fixing build.

This commit is contained in:
Nikolai Kochetov 2022-07-25 12:30:01 +00:00
parent dd65a36c59
commit 1ce8e714d3
2 changed files with 2 additions and 28 deletions

View File

@ -1,26 +0,0 @@
#if defined(OS_LINUX)
#include <cstdlib>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
extern "C"
{
void * mmap(void * /*addr*/, size_t /*length*/, int /*prot*/, int /*flags*/, int /*fd*/, off_t /*offset*/);
int munmap(void * /*addr*/, size_t /*length*/);
}
#pragma GCC diagnostic pop
template<typename T>
inline void ignore(T x __attribute__((unused)))
{
}
static void dummyFunctionForInterposing() __attribute__((used));
static void dummyFunctionForInterposing()
{
/// Suppression for PVS-Studio and clang-tidy.
ignore(mmap(nullptr, 0, 0, 0, 0, 0)); // -V575 NOLINT
ignore(munmap(nullptr, 0)); // -V575 NOLINT
}
#endif

View File

@ -925,8 +925,8 @@ KeyCondition::KeyCondition(
{
for (size_t i = 0, size = key_column_names.size(); i < size; ++i)
{
std::string name = key_column_names[i];
if (!key_columns.count(name))
const auto & name = key_column_names[i];
if (!key_columns.contains(name))
key_columns[name] = i;
}