Kernel: Fix -Wunreachable-code warnings from clang

This commit is contained in:
Nico Weber 2021-10-07 13:51:24 -04:00 committed by Andreas Kling
commit 1cdb12e920
Notes: sideshowbarker 2024-07-18 02:54:43 +09:00
7 changed files with 6 additions and 12 deletions

View file

@ -592,8 +592,8 @@ bool Process::dump_perfcore()
}
auto json_buffer = UserOrKernelBuffer::for_kernel_buffer(json->data());
if (description.write(json_buffer, json->size()).is_error()) {
return false;
dbgln("Failed to generate perfcore for pid {}: Could not write to perfcore file.", pid().value());
return false;
}
dbgln("Wrote perfcore for pid {} to {}", pid().value(), description.absolute_path());