mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
Test: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code. Also, in the case of test-crypto.cpp, I took the liberty to add the prefix 'g_' to the global event loop.
This commit is contained in:
parent
2b76f48a17
commit
76da9a4a7d
9 changed files with 191 additions and 192 deletions
|
@ -35,7 +35,7 @@
|
|||
|
||||
bool g_there_was_an_error = false;
|
||||
|
||||
[[noreturn]] void fatal_error(const char* format, ...)
|
||||
[[noreturn]] static void fatal_error(const char* format, ...)
|
||||
{
|
||||
fputs("\033[31m", stderr);
|
||||
|
||||
|
@ -334,14 +334,14 @@ private:
|
|||
Mode m_mode { Same };
|
||||
};
|
||||
|
||||
OwnPtr<Condition> parse_complex_expression(char* argv[]);
|
||||
static OwnPtr<Condition> parse_complex_expression(char* argv[]);
|
||||
|
||||
static bool should_treat_expression_as_single_string(const StringView& arg_after)
|
||||
{
|
||||
return arg_after.is_null() || arg_after == "-a" || arg_after == "-o";
|
||||
}
|
||||
|
||||
OwnPtr<Condition> parse_simple_expression(char* argv[])
|
||||
static OwnPtr<Condition> parse_simple_expression(char* argv[])
|
||||
{
|
||||
StringView arg = argv[optind];
|
||||
if (arg.is_null()) {
|
||||
|
@ -468,7 +468,7 @@ OwnPtr<Condition> parse_simple_expression(char* argv[])
|
|||
}
|
||||
}
|
||||
|
||||
OwnPtr<Condition> parse_complex_expression(char* argv[])
|
||||
static OwnPtr<Condition> parse_complex_expression(char* argv[])
|
||||
{
|
||||
auto command = parse_simple_expression(argv);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue