diff --git a/Tests/AK/TestNonnullRefPtr.cpp b/Tests/AK/TestNonnullRefPtr.cpp index c26adadacc..7444b9f7b9 100644 --- a/Tests/AK/TestNonnullRefPtr.cpp +++ b/Tests/AK/TestNonnullRefPtr.cpp @@ -16,7 +16,6 @@ struct Object : public RefCounted { TEST_CASE(basics) { auto object = adopt_ref(*new Object); - EXPECT(object.ptr() != nullptr); EXPECT_EQ(object->ref_count(), 1u); object->ref(); EXPECT_EQ(object->ref_count(), 2u); diff --git a/Tests/Kernel/fuzz-syscalls.cpp b/Tests/Kernel/fuzz-syscalls.cpp index e51a39824b..3b7a812c41 100644 --- a/Tests/Kernel/fuzz-syscalls.cpp +++ b/Tests/Kernel/fuzz-syscalls.cpp @@ -134,7 +134,7 @@ static void do_random_tests() 0xffffffff, }; dbgln("Doing a few random syscalls with:"); - for (unsigned long& interesting_value : interesting_values) { + for (const auto& interesting_value : interesting_values) { dbgln(" {0} ({0:p})", interesting_value); } for (size_t i = 0; i < fuzz_syscall_count; ++i) { diff --git a/Tests/LibC/accuracy-strtod.cpp b/Tests/LibC/accuracy-strtod.cpp index 299c64f24c..af833c2323 100644 --- a/Tests/LibC/accuracy-strtod.cpp +++ b/Tests/LibC/accuracy-strtod.cpp @@ -326,7 +326,7 @@ static long long hex_to_ll(const char* hex) int main() { - printf("Running %lu testcases...\n", NUM_TESTCASES); + printf("Running %zu testcases...\n", NUM_TESTCASES); printf("%3s(%-5s): %16s(%2s) %16s(%2s) %16s(%2s) %16s(%2s) – %s\n", "num", "name", "correct", "cs", "builtin", "cs", "old_strtod", "cs", "new_strtod", "cs", "teststring"); int successes = 0; @@ -336,7 +336,7 @@ int main() if (tc.should_consume == -1) { tc.should_consume = strlen(tc.test_string); } - printf("%3lu(%-5s):", i, tc.test_name); + printf("%3zu(%-5s):", i, tc.test_name); printf(" %s(%2d)", tc.hex, tc.should_consume); long long expect_ll = hex_to_ll(tc.hex); @@ -350,7 +350,7 @@ int main() fails += 1; } } - printf("Out of %lu tests, saw %d successes and %d fails.\n", NUM_TESTCASES, successes, fails); + printf("Out of %zu tests, saw %d successes and %d fails.\n", NUM_TESTCASES, successes, fails); if (fails != 0) { printf("FAIL\n"); return 1; diff --git a/Tests/LibSQL/TestSqlDatabase.cpp b/Tests/LibSQL/TestSqlDatabase.cpp index fad6e659db..a63187ac66 100644 --- a/Tests/LibSQL/TestSqlDatabase.cpp +++ b/Tests/LibSQL/TestSqlDatabase.cpp @@ -24,7 +24,6 @@ void insert_and_verify(int); NonnullRefPtr setup_schema(SQL::Database& db) { auto schema = SQL::SchemaDef::construct("TestSchema"); - EXPECT(schema != nullptr); db.add_schema(schema); return schema; } @@ -33,7 +32,6 @@ NonnullRefPtr setup_table(SQL::Database& db) { auto schema = setup_schema(db); auto table = SQL::TableDef::construct(schema, "TestTable"); - EXPECT(table != nullptr); db.add_table(table); table->append_column("TextColumn", SQL::SQLType::Text); table->append_column("IntColumn", SQL::SQLType::Integer);