summaryrefslogtreecommitdiff
path: root/Userland/functrace.cpp
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-08-10 23:48:37 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-12 20:40:59 +0200
commit0248ddc427c3e100226c733b9209c902312cdf73 (patch)
treeca2aeada63801b998e9def4e35ee0a16e0860b78 /Userland/functrace.cpp
parent5574d45edabed5b5d7f1a29455bdd5c495a30ae8 (diff)
downloadserenity-0248ddc427c3e100226c733b9209c902312cdf73.zip
Userland: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code.
Diffstat (limited to 'Userland/functrace.cpp')
-rw-r--r--Userland/functrace.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/functrace.cpp b/Userland/functrace.cpp
index b431a4fbe3..97406fb08e 100644
--- a/Userland/functrace.cpp
+++ b/Userland/functrace.cpp
@@ -47,7 +47,7 @@
#include <string.h>
#include <unistd.h>
-OwnPtr<DebugSession> g_debug_session;
+static OwnPtr<DebugSession> g_debug_session;
static bool g_should_output_color = false;
static void handle_sigint(int)
@@ -58,7 +58,7 @@ static void handle_sigint(int)
g_debug_session = nullptr;
}
-void print_function_call(String function_name, size_t depth)
+static void print_function_call(String function_name, size_t depth)
{
for (size_t i = 0; i < depth; ++i) {
printf(" ");
@@ -66,7 +66,7 @@ void print_function_call(String function_name, size_t depth)
printf("=> %s\n", function_name.characters());
}
-void print_syscall(PtraceRegisters& regs, size_t depth)
+static void print_syscall(PtraceRegisters& regs, size_t depth)
{
for (size_t i = 0; i < depth; ++i) {
printf(" ");
@@ -83,7 +83,7 @@ void print_syscall(PtraceRegisters& regs, size_t depth)
end_color);
}
-NonnullOwnPtr<HashMap<void*, X86::Instruction>> instrument_code()
+static NonnullOwnPtr<HashMap<void*, X86::Instruction>> instrument_code()
{
(void)demangle("foo"); // Required for linked with __cxa_demangle
auto instrumented = make<HashMap<void*, X86::Instruction>>();