1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:37:45 +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 Result {
u64 read_bps;
};
Result average_result(const Vector<Result>& results)
static Result average_result(const Vector<Result>& results)
{
Result average;
@ -57,13 +57,13 @@ Result average_result(const Vector<Result>& results)
return average;
}
void exit_with_usage(int rc)
static void exit_with_usage(int rc)
{
fprintf(stderr, "Usage: disk_benchmark [-h] [-d directory] [-t time_per_benchmark] [-f file_size1,file_size2,...] [-b block_size1,block_size2,...]\n");
exit(rc);
}
Result benchmark(const String& filename, int file_size, int block_size, ByteBuffer& buffer, bool allow_cache);
static Result benchmark(const String& filename, int file_size, int block_size, ByteBuffer& buffer, bool allow_cache);
int main(int argc, char** argv)
{