mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +00:00
Userland: Resolve unused-but-set-varaible warnings
These are almost always bugs, so enable globally. Remove unused counter variables in SystemMonitor and disk_benchmark.
This commit is contained in:
parent
d809637023
commit
f8ea9cd64e
Notes:
sideshowbarker
2024-07-17 21:43:05 +09:00
Author: https://github.com/ADKaster
Commit: f8ea9cd64e
Pull-request: https://github.com/SerenityOS/serenity/pull/11587
3 changed files with 1 additions and 5 deletions
|
@ -147,7 +147,7 @@ Optional<Result> benchmark(const String& filename, int file_size, int block_size
|
|||
auto timer = Core::ElapsedTimer::start_new();
|
||||
|
||||
ssize_t total_written = 0;
|
||||
for (ssize_t j = 0; j < file_size; j += block_size) {
|
||||
while (total_written < file_size) {
|
||||
auto nwritten = write(fd, buffer.data(), block_size);
|
||||
if (nwritten < 0) {
|
||||
perror("write");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue