summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-08-27 00:30:19 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-30 09:43:49 +0200
commit184b454e2f1bf9fe9639cb3f57b4294c6a2a32ec (patch)
tree039ddde1f337f57e211230abf0baa69f411ddf85
parent33138900de506f3c71803b084272d0422c75ae43 (diff)
downloadserenity-184b454e2f1bf9fe9639cb3f57b4294c6a2a32ec.zip
AK: Unbreak building with extra debug macros
-rw-r--r--AK/MappedFile.cpp2
-rw-r--r--AK/StringImpl.cpp2
-rw-r--r--AK/Weakable.h6
3 files changed, 6 insertions, 4 deletions
diff --git a/AK/MappedFile.cpp b/AK/MappedFile.cpp
index 7fcc2c5410..3224e68665 100644
--- a/AK/MappedFile.cpp
+++ b/AK/MappedFile.cpp
@@ -57,7 +57,7 @@ MappedFile::MappedFile(const StringView& file_name)
}
#ifdef DEBUG_MAPPED_FILE
- dbgprintf("MappedFile{%s} := { fd=%d, m_size=%u, m_map=%p }\n", file_name.characters(), fd, m_size, m_map);
+ dbgprintf("MappedFile{%s} := { fd=%d, m_size=%zu, m_map=%p }\n", file_name.to_string().characters(), fd, m_size, m_map);
#endif
close(fd);
diff --git a/AK/StringImpl.cpp b/AK/StringImpl.cpp
index f90d0e632a..2e7797db40 100644
--- a/AK/StringImpl.cpp
+++ b/AK/StringImpl.cpp
@@ -41,7 +41,7 @@ void dump_all_stringimpls()
{
unsigned i = 0;
for (auto& it : *g_all_live_stringimpls) {
- dbgprsize_tf("%u: \"%s\"\n", i, (*it).characters());
+ dbgprintf("%u: \"%s\"\n", i, (*it).characters());
++i;
}
}
diff --git a/AK/Weakable.h b/AK/Weakable.h
index 960b2a57c3..5d40a21632 100644
--- a/AK/Weakable.h
+++ b/AK/Weakable.h
@@ -30,7 +30,9 @@
#include "RefCounted.h"
#include "RefPtr.h"
-#define WEAKABLE_DEBUG
+#ifndef WEAKABLE_DEBUG
+# define WEAKABLE_DEBUG
+#endif
namespace AK {
@@ -64,7 +66,7 @@ public:
WeakPtr<T> make_weak_ptr();
protected:
- Weakable() {}
+ Weakable() { }
~Weakable()
{