Skip to contentSkip to conversation

hugetlb_cgroup: remove unused variable 'i'

PATCH In review Ralph Campbell 2 participants 2 messages Apr 16, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hugetlb_cgroup: remove unused variable 'i'

Compiling tests in tools/testing/selftests/vm/ results in a C compiler warning:

write_to_hugetlbfs.c: In function ‘main’:
write_to_hugetlbfs.c:77:16: warning: unused variable ‘i’
77 | unsigned long i;

Delete the unused variable.

Fixes 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests")
---
 tools/testing/selftests/vm/write_to_hugetlbfs.c | 2 --
 1 file changed, 2 deletions(-)
tools/testing/selftests/vm/write_to_hugetlbfs.c +0 -2
index 110bc4e4015d..6a2caba19ee1 100644
@@ -74,8 +74,6 @@ int main(int argc, char **argv)
 	int write = 0;
 	int reserve = 1;
 
-	unsigned long i;
-
 	if (signal(SIGINT, sig_handler) == SIG_ERR)
 		err(1, "\ncan't catch SIGINT\n");
 
Signature · 1 line
2.25.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Ralph Campbell

Compiling tests in tools/testing/selftests/vm/ results in a C compiler warning:

Quoted 8 lines

write_to_hugetlbfs.c: In function ‘main’:
write_to_hugetlbfs.c:77:16: warning: unused variable ‘i’
77 | unsigned long i;

Delete the unused variable.

Fixes 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests")

Whoops, sorry about that.

Quoted 20 lines
---
 tools/testing/selftests/vm/write_to_hugetlbfs.c | 2 --
 1 file changed, 2 deletions(-)
tools/testing/selftests/vm/write_to_hugetlbfs.c +0 -3
index 110bc4e4015d..6a2caba19ee1 100644
@@ -74,8 +74,6 @@ int main(int argc, char **argv)
        int write = 0;
        int reserve = 1;
 
-       unsigned long i;
-
        if (signal(SIGINT, sig_handler) == SIG_ERR)
                err(1, "\ncan't catch SIGINT\n");
 
--

2.25.2