From f2773a756ab96cfce8518a7cdb5d66f594c8e263 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 2 May 2017 14:42:05 +0200 Subject: Fix warnings hidden earlier due to including application headers as system includes --- vespamalloc/src/tests/test1/testatomic.cpp | 2 +- vespamalloc/src/vespamalloc/malloc/malloc.h | 28 +++++++++++++++------------- vespamalloc/src/vespamalloc/util/callstack.h | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) (limited to 'vespamalloc') diff --git a/vespamalloc/src/tests/test1/testatomic.cpp b/vespamalloc/src/tests/test1/testatomic.cpp index cf627e11c77..97aba7625a1 100644 --- a/vespamalloc/src/tests/test1/testatomic.cpp +++ b/vespamalloc/src/tests/test1/testatomic.cpp @@ -111,7 +111,7 @@ int Test::Main() } { std::atomic taggedPtr; - ASSERT_EQUAL(16, sizeof(vespamalloc::TaggedPtr)); + ASSERT_EQUAL(16u, sizeof(vespamalloc::TaggedPtr)); ASSERT_TRUE(taggedPtr.is_lock_free()); } diff --git a/vespamalloc/src/vespamalloc/malloc/malloc.h b/vespamalloc/src/vespamalloc/malloc/malloc.h index d4145aac0f6..a56cb313e59 100644 --- a/vespamalloc/src/vespamalloc/malloc/malloc.h +++ b/vespamalloc/src/vespamalloc/malloc/malloc.h @@ -1,13 +1,13 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include -#include -#include -#include -#include -#include -#include +#include "common.h" +#include "datasegment.h" +#include "allocchunk.h" +#include "globalpool.h" +#include "threadpool.h" +#include "threadlist.h" +#include "threadproxy.h" namespace vespamalloc { @@ -16,12 +16,14 @@ class MemoryManager : public IAllocator { public: MemoryManager(size_t logLimitAtStart); - virtual ~MemoryManager(); - virtual bool initThisThread(); - virtual bool quitThisThread(); - virtual void enableThreadSupport(); - virtual void setReturnAddressStop(const void * returnAddressStop) { MemBlockPtrT::Stack::setStopAddress(returnAddressStop); } - virtual size_t getMaxNumThreads() const { return _threadList.getMaxNumThreads(); } + ~MemoryManager(); + bool initThisThread() override; + bool quitThisThread() override; + void enableThreadSupport() override; + void setReturnAddressStop(const void * returnAddressStop) override { + MemBlockPtrT::Stack::setStopAddress(returnAddressStop); + } + virtual size_t getMaxNumThreads() const override { return _threadList.getMaxNumThreads(); } void *malloc(size_t sz); void *realloc(void *oldPtr, size_t sz); diff --git a/vespamalloc/src/vespamalloc/util/callstack.h b/vespamalloc/src/vespamalloc/util/callstack.h index ca7c369bfea..4aabacdb0ad 100644 --- a/vespamalloc/src/vespamalloc/util/callstack.h +++ b/vespamalloc/src/vespamalloc/util/callstack.h @@ -75,7 +75,7 @@ size_t StackEntry::fillStack(StackEntry *stack, size_t nelem } else { sz = 0; } - if (sz < nelems) { + if (size_t(sz) < nelems) { stack[sz] = StackEntry(); } return sz; -- cgit v1.2.3