summaryrefslogtreecommitdiffstats
path: root/vespamalloc
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-02 14:42:05 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-02 14:42:05 +0200
commitf2773a756ab96cfce8518a7cdb5d66f594c8e263 (patch)
treedebff5f57722284f038344155acbf3e06a2e05a5 /vespamalloc
parent0f646f10b377b90fc37e9911f9fe383d112ff157 (diff)
Fix warnings hidden earlier due to including application headers as system includes
Diffstat (limited to 'vespamalloc')
-rw-r--r--vespamalloc/src/tests/test1/testatomic.cpp2
-rw-r--r--vespamalloc/src/vespamalloc/malloc/malloc.h28
-rw-r--r--vespamalloc/src/vespamalloc/util/callstack.h2
3 files changed, 17 insertions, 15 deletions
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<vespamalloc::TaggedPtr> 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 <vespamalloc/malloc/common.h>
-#include <vespamalloc/malloc/datasegment.h>
-#include <vespamalloc/malloc/allocchunk.h>
-#include <vespamalloc/malloc/globalpool.h>
-#include <vespamalloc/malloc/threadpool.h>
-#include <vespamalloc/malloc/threadlist.h>
-#include <vespamalloc/malloc/threadproxy.h>
+#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<StackRep>::fillStack(StackEntry<StackRep> *stack, size_t nelem
} else {
sz = 0;
}
- if (sz < nelems) {
+ if (size_t(sz) < nelems) {
stack[sz] = StackEntry<StackRep>();
}
return sz;