Message ID | 20250109173842.1142376-9-usama.anjum@collabora.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | selftest/mm: Remove warnings found by adding compiler flags | expand |
diff --git a/tools/testing/selftests/mm/guard-pages.c b/tools/testing/selftests/mm/guard-pages.c index ece37212a8a2e..fc1165ef2015f 100644 --- a/tools/testing/selftests/mm/guard-pages.c +++ b/tools/testing/selftests/mm/guard-pages.c @@ -142,7 +142,7 @@ TEST_F(guard_pages, basic) const unsigned long NUM_PAGES = 10; const unsigned long page_size = self->page_size; char *ptr; - int i; + unsigned int i; ptr = mmap(NULL, NUM_PAGES * page_size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); @@ -1044,7 +1044,7 @@ TEST_F(guard_pages, fork_cow) const unsigned long page_size = self->page_size; char *ptr; pid_t pid; - int i; + unsigned int i; /* Map 10 pages. */ ptr = mmap(NULL, 10 * page_size, PROT_READ | PROT_WRITE,
Fix type mismatch warnings. Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> --- tools/testing/selftests/mm/guard-pages.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)