summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-01-03 02:52:02 -0700
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-01-04 07:51:31 +0000
commitf8ea9cd64e05177ce731c835fc0d47903c66dd2e (patch)
treed5075454ed5a4906f71e00fd8ee92b5b7d23331d /Userland/Utilities
parentd809637023296924c197bb869497cedf9da8db0e (diff)
downloadserenity-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.cpp2
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");