fix warning as errors outside of ngcore

This commit is contained in:
Christopher Lackner 2018-12-10 16:20:07 +01:00
parent b28cfcc332
commit 60d4ef13ba
3 changed files with 6 additions and 5 deletions

View File

@ -360,7 +360,7 @@ if(ENABLE_CPP_CORE_GUIDELINES_CHECK)
message(WARNING "clang-tidy not found.")
else()
message(STATUS "clang-tidy found: ${CLANG_TIDY_EXE}")
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-warnings-as-errors=*" "-header-filter=libsrc/core/")
set(DO_CLANG_TIDY "${CLANG_TIDY_EXE}" "-header-filter=libsrc/core/")
endif()
endif(ENABLE_CPP_CORE_GUIDELINES_CHECK)

View File

@ -2,3 +2,4 @@ Checks: '*,-clang-analyzer-alpha.*,-*braces-around-statements,-fuchsia-*,-google
CheckOptions:
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: 1
WarningsAsErrors: '*'

View File

@ -97,8 +97,8 @@ void testNullPtr(Archive& in, Archive& out)
shared_ptr<string> sp = nullptr;
out & p & sp;
out.FlushBuffer();
SharedPtrHolder* pin;
shared_ptr<string> spin;
SharedPtrHolder* pin = nullptr;
shared_ptr<string> spin = nullptr;
in & pin & spin;
CHECK(pin == nullptr);
CHECK(spin == nullptr);
@ -186,8 +186,8 @@ void testMultipleInheritance(Archive& in, Archive& out)
{
out & p & p2;
out.FlushBuffer();
PtrHolder* pin;
SharedPtrHolder* pin2;
PtrHolder* pin = nullptr;
SharedPtrHolder* pin2 = nullptr;
in & pin & pin2;
checkPtr(pin, pin2);
}