diff options
author | Andrew Kaster <akaster@serenityos.org> | 2022-01-03 02:52:02 -0700 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2022-01-04 07:51:31 +0000 |
commit | f8ea9cd64e05177ce731c835fc0d47903c66dd2e (patch) | |
tree | d5075454ed5a4906f71e00fd8ee92b5b7d23331d /Userland/Utilities | |
parent | d809637023296924c197bb869497cedf9da8db0e (diff) | |
download | serenity-f8ea9cd64e05177ce731c835fc0d47903c66dd2e.zip |
Userland: Resolve unused-but-set-varaible warnings
These are almost always bugs, so enable globally.
Remove unused counter variables in SystemMonitor and disk_benchmark.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/disk_benchmark.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/disk_benchmark.cpp b/Userland/Utilities/disk_benchmark.cpp index 5d677b3ed1..d55c5073c4 100644 --- a/Userland/Utilities/disk_benchmark.cpp +++ b/Userland/Utilities/disk_benchmark.cpp @@ -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"); |