aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2023-11-20 17:35:49 +0100
committerSebastian Pipping <sebastian@pipping.org>2023-11-20 18:36:08 +0100
commit2ec3bd610e7308b20eebe2618ee6e695988b4ffe (patch)
tree8317d7ce8adc8c90d5d0e3444a0b6e8289e76951 /tests
parent9d5b333fb6e548aa2a9cda9094ad7e96e3eb33f7 (diff)
downloadbindfs-2ec3bd610e7308b20eebe2618ee6e695988b4ffe.tar.gz
odirect_write.c: Resolve unused variable "total_size"
Symptom with Clang 17: > tests/odirect_write.c:35:12: warning: variable 'total_size' set but not used [-Wunused-but-set-variable] > 35 | size_t total_size = 0; > | ^
Diffstat (limited to 'tests')
-rw-r--r--tests/odirect_write.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/odirect_write.c b/tests/odirect_write.c
index 626ff5c..11dde43 100644
--- a/tests/odirect_write.c
+++ b/tests/odirect_write.c
@@ -32,7 +32,6 @@ int main(int argc, char** argv) {
return 1;
}
- size_t total_size = 0;
while (1) {
if (feof(stdin)) {
break;
@@ -48,8 +47,6 @@ int main(int argc, char** argv) {
continue;
}
- total_size += amt_read;
-
ssize_t res = write(fd, buf, buf_size);
if (res == -1) {
perror("failed to write");