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

Userland: 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:48:37 +02:00 committed by Andreas Kling
parent 5574d45eda
commit 0248ddc427
22 changed files with 85 additions and 83 deletions

View file

@ -42,7 +42,7 @@ struct OpenFile {
String name;
};
Vector<OpenFile> get_open_files_by_pid(pid_t pid)
static Vector<OpenFile> get_open_files_by_pid(pid_t pid)
{
auto file = Core::File::open(String::format("/proc/%d/fds", pid), Core::IODevice::OpenMode::ReadOnly);
if (file.is_error()) {
@ -69,7 +69,7 @@ Vector<OpenFile> get_open_files_by_pid(pid_t pid)
return files;
}
void display_entry(const OpenFile& file, const Core::ProcessStatistics& statistics)
static void display_entry(const OpenFile& file, const Core::ProcessStatistics& statistics)
{
printf("%-28s %4d %4d %-10s %4d %s\n", statistics.name.characters(), file.pid, statistics.pgid, statistics.username.characters(), file.fd, file.name.characters());
}