1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 23:27:35 +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

@ -36,7 +36,7 @@
#define DEFAULT_LINE_COUNT 10
int tail_from_pos(Core::File& file, off_t startline, bool want_follow)
static int tail_from_pos(Core::File& file, off_t startline, bool want_follow)
{
if (!file.seek(startline + 1))
return 1;
@ -62,7 +62,7 @@ int tail_from_pos(Core::File& file, off_t startline, bool want_follow)
return 0;
}
off_t find_seek_pos(Core::File& file, int wanted_lines)
static off_t find_seek_pos(Core::File& file, int wanted_lines)
{
// Rather than reading the whole file, start at the end and work backwards,
// stopping when we've found the number of lines we want.