mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +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
|
@ -256,7 +256,7 @@ constexpr size_t NUM_TESTCASES = sizeof(TESTCASES) / sizeof(TESTCASES[0]);
|
|||
|
||||
typedef double (*strtod_fn_t)(const char* str, char** endptr);
|
||||
|
||||
long long cast_ll(double d)
|
||||
static long long cast_ll(double d)
|
||||
{
|
||||
union readable_t {
|
||||
double as_double;
|
||||
|
@ -273,7 +273,7 @@ long long cast_ll(double d)
|
|||
return readable.as_ll;
|
||||
}
|
||||
|
||||
bool is_strtod_close(strtod_fn_t strtod_fn, const char* test_string, const char* expect_hex, int expect_consume, long long expect_ll)
|
||||
static bool is_strtod_close(strtod_fn_t strtod_fn, const char* test_string, const char* expect_hex, int expect_consume, long long expect_ll)
|
||||
{
|
||||
union readable_t {
|
||||
double as_double;
|
||||
|
@ -324,7 +324,7 @@ bool is_strtod_close(strtod_fn_t strtod_fn, const char* test_string, const char*
|
|||
return !(wrong_hex || error_cns || wrong_cns);
|
||||
}
|
||||
|
||||
long long hex_to_ll(const char* hex)
|
||||
static long long hex_to_ll(const char* hex)
|
||||
{
|
||||
long long result = 0;
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue