1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

Applications: Mark compilation-unit-only functions as static

This enables a nice warning in case a function becomes dead code.
This commit is contained in:
Ben Wiederhake 2020-08-10 23:51:31 +02:00 committed by Andreas Kling
parent 5fe6ca75ca
commit ef9a3b8e46
3 changed files with 6 additions and 6 deletions

View file

@ -56,7 +56,7 @@ static void handle_sigint(int)
g_debug_session = nullptr; g_debug_session = nullptr;
} }
void handle_print_registers(const PtraceRegisters& regs) static void handle_print_registers(const PtraceRegisters& regs)
{ {
printf("eax: 0x%x\n", regs.eax); printf("eax: 0x%x\n", regs.eax);
printf("ecx: 0x%x\n", regs.ecx); printf("ecx: 0x%x\n", regs.ecx);
@ -70,7 +70,7 @@ void handle_print_registers(const PtraceRegisters& regs)
printf("eflags: 0x%x\n", regs.eflags); printf("eflags: 0x%x\n", regs.eflags);
} }
bool handle_disassemble_command(const String& command, void* first_instruction) static bool handle_disassemble_command(const String& command, void* first_instruction)
{ {
(void)demangle("foo"); (void)demangle("foo");
auto parts = command.split(' '); auto parts = command.split(' ');
@ -110,7 +110,7 @@ bool handle_disassemble_command(const String& command, void* first_instruction)
return true; return true;
} }
bool handle_breakpoint_command(const String& command) static bool handle_breakpoint_command(const String& command)
{ {
auto parts = command.split(' '); auto parts = command.split(' ');
if (parts.size() != 2) if (parts.size() != 2)
@ -158,7 +158,7 @@ bool handle_breakpoint_command(const String& command)
return true; return true;
} }
void print_help() static void print_help()
{ {
printf("Options:\n" printf("Options:\n"
"cont - Continue execution\n" "cont - Continue execution\n"

View file

@ -134,7 +134,7 @@ static void run_command(int ptm_fd, String command)
} }
} }
RefPtr<GUI::Window> create_settings_window(TerminalWidget& terminal) static RefPtr<GUI::Window> create_settings_window(TerminalWidget& terminal)
{ {
auto window = GUI::Window::construct(); auto window = GUI::Window::construct();
window->set_title("Terminal Settings"); window->set_title("Terminal Settings");

View file

@ -53,7 +53,7 @@ struct ContentPage {
Vector<String> content; Vector<String> content;
}; };
Optional<Vector<ContentPage>> parse_welcome_file(const String& path) static Optional<Vector<ContentPage>> parse_welcome_file(const String& path)
{ {
const auto error = Optional<Vector<ContentPage>>(); const auto error = Optional<Vector<ContentPage>>();
auto file = Core::File::construct(path); auto file = Core::File::construct(path);