[LINT] Fixed lint issues after clang-format update

This commit is contained in:
Gliniak 2024-06-13 20:56:56 +02:00
parent ce990e2828
commit ec267c348a
13 changed files with 21 additions and 28 deletions

View File

@ -975,8 +975,7 @@ TEST_CASE("Create and Run Thread", "[thread]") {
thread = Thread::Create(params, [] { thread = Thread::Create(params, [] {
Thread::Exit(-1); Thread::Exit(-1);
FAIL("Function must not return"); FAIL("Function must not return");
while (true) while (true);
;
}); });
result = Wait(thread.get(), false, 1s); result = Wait(thread.get(), false, 1s);
REQUIRE(result == WaitResult::kSuccess); REQUIRE(result == WaitResult::kSuccess);
@ -992,8 +991,7 @@ TEST_CASE("Create and Run Thread", "[thread]") {
thread = Thread::Create(params, [] { thread = Thread::Create(params, [] {
Thread::Exit(-1); Thread::Exit(-1);
FAIL("Function must not return"); FAIL("Function must not return");
while (true) while (true);
;
}); });
REQUIRE(thread != nullptr); REQUIRE(thread != nullptr);
result = Wait(thread.get(), false, 1s); result = Wait(thread.get(), false, 1s);
@ -1128,8 +1126,7 @@ TEST_CASE("Test Thread QueueUserCallback", "[thread]") {
order++; // 2 order++; // 2
AlertableSleep(1s); AlertableSleep(1s);
FAIL("Thread should have been terminated during alertable sleep"); FAIL("Thread should have been terminated during alertable sleep");
while (true) while (true);
;
}); });
REQUIRE(!spin_wait_for(100ms, [&] { return order == 3; })); // timeout REQUIRE(!spin_wait_for(100ms, [&] { return order == 3; })); // timeout
thread->QueueUserCallback([] { Thread::Exit(0); }); thread->QueueUserCallback([] { Thread::Exit(0); });

View File

@ -960,8 +960,7 @@ const uint32_t error_table_0xC0980001[] = {
0x00000037, // 0xC0980008 0x00000037, // 0xC0980008
}; };
#define MAKE_ENTRY(x) \ #define MAKE_ENTRY(x) {x, xe::countof(error_table_##x), error_table_##x}
{ x, xe::countof(error_table_##x), error_table_##x }
const error_lookup_table error_tables[] = { const error_lookup_table error_tables[] = {
MAKE_ENTRY(0x00000103), MAKE_ENTRY(0x40000002), MAKE_ENTRY(0x40020056), MAKE_ENTRY(0x00000103), MAKE_ENTRY(0x40000002), MAKE_ENTRY(0x40020056),
MAKE_ENTRY(0x400200AF), MAKE_ENTRY(0x80000001), MAKE_ENTRY(0x80000288), MAKE_ENTRY(0x400200AF), MAKE_ENTRY(0x80000001), MAKE_ENTRY(0x80000288),

View File

@ -151,15 +151,13 @@ static int RtlCompareStringN_impl(uint8_t* string_1, unsigned int string_1_len,
int case_insensitive) { int case_insensitive) {
if (string_1_len == 0xFFFFFFFF) { if (string_1_len == 0xFFFFFFFF) {
uint8_t* string1_strlen_iter = string_1; uint8_t* string1_strlen_iter = string_1;
while (*string1_strlen_iter++) while (*string1_strlen_iter++);
;
string_1_len = string_1_len =
static_cast<unsigned int>(string1_strlen_iter - string_1 - 1); static_cast<unsigned int>(string1_strlen_iter - string_1 - 1);
} }
if (string_2_len == 0xFFFFFFFF) { if (string_2_len == 0xFFFFFFFF) {
uint8_t* string2_strlen_iter = string_2; uint8_t* string2_strlen_iter = string_2;
while (*string2_strlen_iter++) while (*string2_strlen_iter++);
;
string_2_len = string_2_len =
static_cast<unsigned int>(string2_strlen_iter - string_2 - 1); static_cast<unsigned int>(string2_strlen_iter - string_2 - 1);
} }

View File

@ -202,8 +202,7 @@ const char* HostExceptionReport::GetFormattedAddress(uintptr_t address) {
size_t search_back = strlen(tmp_module_name); size_t search_back = strlen(tmp_module_name);
// hunt backwards for the last sep // hunt backwards for the last sep
while (tmp_module_name[--search_back] != '\\') while (tmp_module_name[--search_back] != '\\');
;
// MessageBoxA(nullptr, tmp_module_name, "ffds", MB_OK); // MessageBoxA(nullptr, tmp_module_name, "ffds", MB_OK);
sprintf_s(current_buffer, "%s+%llX", tmp_module_name + search_back + 1, sprintf_s(current_buffer, "%s+%llX", tmp_module_name + search_back + 1,